From: Matthias Klose Date: Sun, 26 Jul 2026 19:40:32 +0000 (+0200) Subject: Description: Fix ld-bootstrap testsuite when configured with --enable-plugins X-Git-Tag: archive/raspbian/2.47-2+rpi1^2~16 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d9ac7a6c6c59d2912f61856a2b25212fec45e49d;p=binutils.git Description: Fix ld-bootstrap testsuite when configured with --enable-plugins Upstream status: proposed patch Upstream status: proposed patch Gbp-Pq: Name 131_ld_bootstrap_testsuite.patch --- diff --git a/ld/testsuite/ld-bootstrap/bootstrap.exp b/ld/testsuite/ld-bootstrap/bootstrap.exp index 84a59f2ae..4fb97e467 100644 --- a/ld/testsuite/ld-bootstrap/bootstrap.exp +++ b/ld/testsuite/ld-bootstrap/bootstrap.exp @@ -57,6 +57,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 @@ -131,6 +140,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 { @@ -185,6 +199,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"} {