aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-bootstrap
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2018-01-29 04:54:57 -0800
committerH.J. Lu <hjl.tools@gmail.com>2018-01-29 04:55:23 -0800
commit98d72909f8f216fb9fc4d7c2c8e48dbe2823cd0b (patch)
treee357718d8f39db126db36a047097f42c3467f68a /ld/testsuite/ld-bootstrap
parenteb77f6a4621795367a39cdd30957903af9dbb815 (diff)
downloadfsf-binutils-gdb-98d72909f8f216fb9fc4d7c2c8e48dbe2823cd0b.zip
fsf-binutils-gdb-98d72909f8f216fb9fc4d7c2c8e48dbe2823cd0b.tar.gz
fsf-binutils-gdb-98d72909f8f216fb9fc4d7c2c8e48dbe2823cd0b.tar.bz2
ld: Skip unsupported static executable tests
Skip static executable tests if static executable is unsupported. Tested on Linux/x86 without libc.a. PR ld/22732 * testsuite/config/default.exp (STATIC_LDFLAGS): New. Set to "-static" if target compiler supports it. * testsuite/ld-bootstrap/bootstrap.exp: Skip static executable tests if target compiler doesn't support it. * testsuite/ld-ifunc/ifunc.exp: Likewise. * testsuite/lib/ld-lib.exp (run_ld_link_exec_tests): Likewise. (run_cc_link_tests): Likewise.
Diffstat (limited to 'ld/testsuite/ld-bootstrap')
-rw-r--r--ld/testsuite/ld-bootstrap/bootstrap.exp8
1 files changed, 8 insertions, 0 deletions
diff --git a/ld/testsuite/ld-bootstrap/bootstrap.exp b/ld/testsuite/ld-bootstrap/bootstrap.exp
index 32009d1..f0bac3f 100644
--- a/ld/testsuite/ld-bootstrap/bootstrap.exp
+++ b/ld/testsuite/ld-bootstrap/bootstrap.exp
@@ -29,6 +29,8 @@ if ![isnative] {
return
}
+global STATIC_LDFLAGS
+
# Determine if plugin support is present.
remote_exec host "$nm --help" "" "/dev/null" "plugin-support"
set tmp [file_contents "plugin-support"]
@@ -95,6 +97,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 {