Upload Tizen:Base source
[external/binutils.git] / debian / patches / 131_ld_bootstrap_testsuite.patch
1 Author: 
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
7 @@ -40,6 +40,15 @@
8      set plugins "no"
9  }
10  
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 {
15 +    set plugins "yes"
16 +} else {
17 +    set plugins "no"
18 +}
19 +
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
23 @@ -78,6 +87,11 @@
24         continue
25      }
26  
27 +    if { $flags == "--static" && $plugins == "yes" } then {
28 +       untested $testname
29 +       continue
30 +    }
31 +
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 {
35 @@ -112,6 +126,10 @@
36      if { $plugins == "yes" } {
37         set extralibs "$extralibs -ldl"
38      }
39 +
40 +    if { $plugins == "yes" } {
41 +       set extralibs "$extralibs -ldl"
42 +    }
43  
44      # On Irix 5, linking with --static only works if all the files are
45      # compiled using -non_shared.