aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-bootstrap/bootstrap.exp
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-10-16 10:32:51 +0000
committerNick Clifton <nickc@redhat.com>2009-10-16 10:32:51 +0000
commited94852035eae25aaf396e9299cff8317cb3e589 (patch)
tree93d6a0a9d586b6d66701ae538c7f7529b97fface /ld/testsuite/ld-bootstrap/bootstrap.exp
parent1ed06042dbd7b4590f9b6a7ac16a71b62d46730e (diff)
downloadgdb-ed94852035eae25aaf396e9299cff8317cb3e589.zip
gdb-ed94852035eae25aaf396e9299cff8317cb3e589.tar.gz
gdb-ed94852035eae25aaf396e9299cff8317cb3e589.tar.bz2
* bootstrap.exp: Detect if plugins are enabled. Skip the static
link test and add -ldl to the remaining tests if they are.
Diffstat (limited to 'ld/testsuite/ld-bootstrap/bootstrap.exp')
-rw-r--r--ld/testsuite/ld-bootstrap/bootstrap.exp24
1 files changed, 23 insertions, 1 deletions
diff --git a/ld/testsuite/ld-bootstrap/bootstrap.exp b/ld/testsuite/ld-bootstrap/bootstrap.exp
index 96bd706..ecc760a 100644
--- a/ld/testsuite/ld-bootstrap/bootstrap.exp
+++ b/ld/testsuite/ld-bootstrap/bootstrap.exp
@@ -30,6 +30,16 @@ if ![isnative] {
return
}
+# Determine if plugin support is present.
+remote_exec host "$nm --help" "" "/dev/null" "plugin-support"
+set tmp [file_contents "plugin-support"]
+regexp ".*\(--plugin\).*\n" $tmp foo plugins
+if [info exists plugins] then {
+ set plugins "yes"
+} else {
+ set plugins "no"
+}
+
# Bootstrap ld. First link the object files together using -r, in
# order to test -r. Then link the result into an executable, ld1, to
# really test -r. Use ld1 to link a fresh ld, ld2. Use ld2 to link a
@@ -61,8 +71,15 @@ foreach flags {"" "strip" "--static" "--traditional-format"
continue
}
+ # Plugin support requires linking with a dynamic library which
+ # means that these
+ if { $flags == "--static" && $plugins == "yes" } then {
+ untested $testname
+ continue
+ }
+
# If we only have a shared libbfd, we probably can't run the
- # --static test.
+ # --static test.will fail.
if { $flags == "--static" && ! [string match "*libbfd.a*" $BFDLIB] } then {
untested $testname
continue
@@ -91,6 +108,11 @@ foreach flags {"" "strip" "--static" "--traditional-format"
}
}
+ # Plugin support requires linking with libdl.
+ if { $plugins == "yes" } {
+ set extralibs "$extralibs -ldl"
+ }
+
# On Irix 5, linking with --static only works if all the files are
# compiled using -non_shared.
if {"$flags" == "--static"} {