aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-gc
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2008-01-14 19:52:43 +0000
committerHans-Peter Nilsson <hp@axis.com>2008-01-14 19:52:43 +0000
commit3becfab9d2c41dba985c184dfd0df46314ef6b13 (patch)
treebd846f8f9af2b167c3f8053a1497fd1b4ce128a0 /ld/testsuite/ld-gc
parentcc86f28f31e2122fb7429cdd19936846e0821606 (diff)
downloadgdb-3becfab9d2c41dba985c184dfd0df46314ef6b13.zip
gdb-3becfab9d2c41dba985c184dfd0df46314ef6b13.tar.gz
gdb-3becfab9d2c41dba985c184dfd0df46314ef6b13.tar.bz2
* ld-gc/gc.exp (test_gc): Let missing C compiler make tests
"untested" instead of "failed".
Diffstat (limited to 'ld/testsuite/ld-gc')
-rw-r--r--ld/testsuite/ld-gc/gc.exp9
1 files changed, 8 insertions, 1 deletions
diff --git a/ld/testsuite/ld-gc/gc.exp b/ld/testsuite/ld-gc/gc.exp
index 68a0ba1..acadcba 100644
--- a/ld/testsuite/ld-gc/gc.exp
+++ b/ld/testsuite/ld-gc/gc.exp
@@ -27,7 +27,9 @@ if ![check_gc_sections_available] {
set cflags "-ffunction-sections -fdata-sections"
set objfile "tmpdir/gc.o"
-ld_compile "$CC -c $CFLAGS $cflags" $srcdir/$subdir/gc.c $objfile
+if { [is_remote host] || [which $CC] } {
+ ld_compile "$CC -c $CFLAGS $cflags" $srcdir/$subdir/gc.c $objfile
+}
proc test_gc { testname filename linker ldflags} {
global nm
@@ -36,6 +38,11 @@ proc test_gc { testname filename linker ldflags} {
global nm_output
global objfile
+ if ![file readable $objfile ] {
+ untested $testname
+ return
+ }
+
set outfile "tmpdir/$filename"
if ![ld_simple_link $linker $outfile "-L$srcdir/$subdir $ldflags $objfile"] {