_ld_bootstrap_testsuite
authorMatthias Klose <doko@debian.org>
Sun, 22 Oct 2017 20:41:34 +0000 (21:41 +0100)
committerMatthias Klose <doko@debian.org>
Sun, 22 Oct 2017 20:41:34 +0000 (21:41 +0100)
Upstream status: proposed patch

Gbp-Pq: Name 131_ld_bootstrap_testsuite.patch

ld/testsuite/ld-bootstrap/bootstrap.exp

index 9a68ebe34f5ac844b5e1a6b30d16e5461d9540f2..521e3566e7a54f4367cc4a7eebb1a1516c0db8db 100644 (file)
@@ -44,6 +44,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
@@ -102,6 +111,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 {
@@ -146,6 +160,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"} {