* ld-gc/gc.exp (test_gc): Let missing C compiler make tests
[deliverable/binutils-gdb.git] / ld / testsuite / ld-gc / gc.exp
index 68a0ba11642d451392d4aeb94e990c83b337242e..acadcba38b7e68f0d43ebc7d230d106bb6a93aeb 100644 (file)
@@ -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"] {
This page took 0.023491 seconds and 4 git commands to generate.