aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-shared/shared.exp
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-shared/shared.exp')
-rw-r--r--ld/testsuite/ld-shared/shared.exp15
1 files changed, 11 insertions, 4 deletions
diff --git a/ld/testsuite/ld-shared/shared.exp b/ld/testsuite/ld-shared/shared.exp
index 748a93b..93181dc 100644
--- a/ld/testsuite/ld-shared/shared.exp
+++ b/ld/testsuite/ld-shared/shared.exp
@@ -25,8 +25,10 @@
# Note that linking against ELF shared libraries is tested by the
# bootstrap test.
-# This test can only be run if ld generates native executables.
-if ![isnative] then {return}
+# Check to see if the C compiler works
+if { [which $CC] == 0 } {
+ return
+}
# This test can only be run on a couple of ELF platforms.
# Square bracket expressions seem to confuse istarget.
@@ -137,7 +139,7 @@ proc shared_test { progname testname main sh1 sh2 dat args } {
if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
set shared "-bM:SRE -bE:$tmpdir/xcoff.exp"
}
- if {![ld_simple_link $CC $tmpdir/$progname.so "$shared $shldflags $tmpdir/$sh1 $tmpdir/$sh2"]} {
+ if {![ld_link $CC $tmpdir/$progname.so "$shared $shldflags $tmpdir/$sh1 $tmpdir/$sh2"]} {
fail "$testname"
return
}
@@ -150,11 +152,16 @@ proc shared_test { progname testname main sh1 sh2 dat args } {
if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
set rpath /lib:$tmpdir
}
- if ![ld_simple_link $CC $tmpdir/$progname "-Wl,-rpath,$rpath $tmpdir/$main $tmpdir/$progname.so"] {
+ if ![ld_link $CC $tmpdir/$progname "-Wl,-rpath,$rpath $tmpdir/$main $tmpdir/$progname.so"] {
fail "$testname"
return
}
+ if ![isnative] {
+ unsupported $testname
+ return
+ }
+
# Run the resulting program
send_log "$tmpdir/$progname >$tmpdir/$progname.out\n"
verbose "$tmpdir/$progname >$tmpdir/$progname.out"