File: 131_ld_bootstrap_testsuite.patch

package info (click to toggle)
binutils 2.45.50.20250903-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 379,976 kB
  • sloc: ansic: 1,508,376; asm: 825,214; cpp: 214,760; exp: 79,506; makefile: 71,882; sh: 25,520; yacc: 15,066; lisp: 13,640; perl: 13,404; lex: 1,714; ada: 1,681; pascal: 1,446; python: 1,246; cs: 879; java: 478; sed: 191; xml: 95; awk: 25
file content (45 lines) | stat: -rw-r--r-- 1,404 bytes parent folder | download | duplicates (10)
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
Author: 
Description: Description: Fix ld-bootstrap testsuite when configured with --enable-plugins
Author: Rafael Espindola
Upstream status: proposed patch
--- a/ld/testsuite/ld-bootstrap/bootstrap.exp
+++ b/ld/testsuite/ld-bootstrap/bootstrap.exp
@@ -56,6 +56,15 @@ if [check_plugin_api_available] {
     set plugins "yes"
 }
 
+remote_exec host "$nm --help" "" "/dev/null" "plugin-support"
+set tmp [file_contents "plugin-support"]
+regexp ".*\(--plugin\).*\n" $tmp foo plugins
+if [info exists plugins] then {
+    set plugins "yes"
+} else {
+    set plugins "no"
+}
+
 # Bootstrap ld.  First link the object files together using -r, in
 # order to test -r.  Then link the result into an executable, ld1, to
 # really test -r.  Use ld1 to link a fresh ld, ld2.  Use ld2 to link a
@@ -130,6 +139,11 @@ foreach flags $test_flags {
 	continue
     }
 
+    if { $flags == "--static" && $plugins == "yes" } then {
+	untested $testname
+	continue
+    }
+
     # If we only have a shared libbfd, we probably can't run the
     # --static test.
     if { $flags == "--static" && ! [string match "*libbfd.a*" $BFDLIB] } then {
@@ -184,6 +198,10 @@ foreach flags $test_flags {
 	}
     }
 
+    if { $plugins == "yes" } {
+	set extralibs "$extralibs -ldl"
+    }
+
     # On Irix 5, linking with --static only works if all the files are
     # compiled using -non_shared.
     if {"$flags" == "--static"} {