tcl global directive outside proc body does nothing (ld)
[deliverable/binutils-gdb.git] / ld / testsuite / ld-bootstrap / bootstrap.exp
index 32009d181f7ea64e697d3b7f07fb2e068bb43e5b..43928fb6483fd2d2f11dbb03c27686bf281d6543 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for LD Bootstrap Tests
-#   Copyright (C) 1993-2018 Free Software Foundation, Inc.
+#   Copyright (C) 1993-2020 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -95,6 +95,12 @@ foreach flags $test_flags {
        continue
     }
 
+    # If -static doesn't work, these tests will fail.
+    if { $flags == "--static" && [string match "" $STATIC_LDFLAGS] } then {
+       untested $testname
+       continue
+    }
+
     # Plugin support requires linking with a dynamic library which
     # means that these tests will fail.
     if { $flags == "--static" && $plugins == "yes" } then {
@@ -152,7 +158,7 @@ foreach flags $test_flags {
        setup_xfail "mips*-*-irix5*"
     }
 
-    if ![ld_link $CC tmpdir/ld1 "$flags tmpdir/ld-partial.o $BFDLIB $LIBIBERTY $extralibs"] {
+    if ![ld_link $CC tmpdir/ld1 "$flags tmpdir/ld-partial.o $CTFLIB $BFDLIB $LIBIBERTY $extralibs"] {
        fail $testname
        continue
     }
@@ -160,6 +166,7 @@ foreach flags $test_flags {
     if {"$do_strip" == "yes"} { 
        verbose -log "$strip tmpdir/ld1"     
        catch "exec $strip tmpdir/ld1" exec_output
+       set exec_output [prune_warnings $exec_output]
        if ![string match "" $exec_output] then {
            verbose -log "$exec_output"
            fail $testname
@@ -168,24 +175,26 @@ foreach flags $test_flags {
     }
 
     regsub /tmpdir/ld/ $gcc_B_opt_save /tmpdir/gccld1/ gcc_B_opt
-    if ![ld_link $CC tmpdir/ld2 "$flags $OFILES $BFDLIB $LIBIBERTY $extralibs"] {
+    if ![ld_link $CC tmpdir/ld2 "$flags $OFILES $CTFLIB $BFDLIB $LIBIBERTY $extralibs"] {
        fail $testname
        continue
     }
 
     regsub /tmpdir/ld/ $gcc_B_opt_save /tmpdir/gccld2/ gcc_B_opt
-    if ![ld_link $CC tmpdir/ld3 "$flags $OFILES $BFDLIB $LIBIBERTY $extralibs"] {
+    if ![ld_link $CC tmpdir/ld3 "$flags $OFILES $CTFLIB $BFDLIB $LIBIBERTY $extralibs"] {
        fail $testname
        continue
     }
 
-    if { "$flags" == "--static" && { [istarget ia64-*-elf*] || [istarget ia64-*-linux*] }
-        || [istarget mips*-*-linux*] } {
+    if { "$flags" == "--static"
+        && ([istarget ia64-*-elf*]
+            || [istarget ia64-*-linux*]
+            || [istarget mips*-*-linux*]) } {
        # On ia64 and mips, tmpdir/ld2 != tmpdir/ld3 is normal since they are
        # generated by different linkers, tmpdir/ld1 and tmpdir/ld2.
        # So we rebuild tmpdir/ld2 with tmpdir/ld3.
        regsub /tmpdir/ld/ $gcc_B_opt_save /tmpdir/gccld3/ gcc_B_opt
-       if ![ld_link $CC tmpdir/ld2 "$flags $OFILES $BFDLIB $LIBIBERTY $extralibs"] {
+       if ![ld_link $CC tmpdir/ld2 "$flags $OFILES $CTFLIB $BFDLIB $LIBIBERTY $extralibs"] {
            fail $testname
            continue
        }
This page took 0.025095 seconds and 4 git commands to generate.