summaryrefslogtreecommitdiff
blob: 74f96cfd4495892b75eefb18834f4ab1af519d5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From 221b8f6dfdfcb5e9d04069fdc2fb1aa6a881cb60 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= <dilfridge@gentoo.org>
Date: Sun, 3 Jun 2018 21:40:36 +0200
Subject: [PATCH 07/16] Gentoo: Pass --no-warn-shared-textrel to ld in its
 testsuite

---
 ld/testsuite/lib/ld-lib.exp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index 853a4d87e6..ec123e2fc1 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -165,7 +165,7 @@ proc default_ld_relocate { ld target objects } {
     global HOSTING_EMU
 
     remote_file host delete $target
-    return [run_host_cmd_yesno "$ld" "$HOSTING_EMU --hash-style=sysv -o $target -r $objects"]
+    return [run_host_cmd_yesno "$ld" "$HOSTING_EMU --hash-style=sysv --no-warn-shared-textrel -o $target -r $objects"]
 }
 
 # Check to see if ld is being invoked with a non-endian output format
@@ -203,9 +203,9 @@ proc default_ld_link { ld target objects } {
     # - .*ld/ld-new    -> we're working with the new linker
     # - otherwise      -> we're likely working with the system compiler
     if {[regexp {ld/ld-new$} $ld]} {
-      set gentoosysv "--hash-style=sysv"
+      set gentoosysv "--hash-style=sysv --no-warn-shared-textrel"
     } else {
-      set gentoosysv "-Wl,--hash-style=sysv"
+      set gentoosysv "-Wl,--hash-style=sysv -Wl,--no-warn-shared-textrel"
     }
 
     remote_file host delete $target
@@ -972,7 +972,7 @@ proc run_dump_test { name {extra_options {}} } {
 
 	# Add -L$srcdir/$subdir so that the linker command can use
 	# linker scripts in the source directory.
-	set cmd "$LD --hash-style=sysv $ld_extra_opt $LDFLAGS -L$srcdir/$subdir \
+	set cmd "$LD --hash-style=sysv --no-warn-shared-textrel $ld_extra_opt $LDFLAGS -L$srcdir/$subdir \
 		   $opts(ld) -o $objfile $objfiles $opts(ld_after_inputfiles)"
 
         # If needed then check for, or add a -Map option.
-- 
2.26.2