2 Description: Description: Fix ld-bootstrap testsuite when configured with --enable-plugins
3 Author: Rafael Espindola
4 Upstream status: proposed patch
5 --- a/ld/testsuite/ld-bootstrap/bootstrap.exp
6 +++ b/ld/testsuite/ld-bootstrap/bootstrap.exp
11 +remote_exec host "$nm --help" "" "/dev/null" "plugin-support"
12 +set tmp [file_contents "plugin-support"]
13 +regexp ".*\(--plugin\).*\n" $tmp foo plugins
14 +if [info exists plugins] then {
20 # Bootstrap ld. First link the object files together using -r, in
21 # order to test -r. Then link the result into an executable, ld1, to
22 # really test -r. Use ld1 to link a fresh ld, ld2. Use ld2 to link a
27 + if { $flags == "--static" && $plugins == "yes" } then {
32 # If we only have a shared libbfd, we probably can't run the
33 # --static test.will fail.
34 if { $flags == "--static" && ! [string match "*libbfd.a*" $BFDLIB] } then {
36 if { $plugins == "yes" } {
37 set extralibs "$extralibs -ldl"
40 + if { $plugins == "yes" } {
41 + set extralibs "$extralibs -ldl"
44 # On Irix 5, linking with --static only works if all the files are
45 # compiled using -non_shared.