# 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.
#
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 {
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
}
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
}
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
}