]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* ld-gc/gc.exp (test_gc): Let missing C compiler make tests
authorHans-Peter Nilsson <hp@axis.com>
Mon, 14 Jan 2008 19:52:43 +0000 (19:52 +0000)
committerHans-Peter Nilsson <hp@axis.com>
Mon, 14 Jan 2008 19:52:43 +0000 (19:52 +0000)
"untested" instead of "failed".

ld/testsuite/ChangeLog
ld/testsuite/ld-gc/gc.exp

index c11355cc6914c49745dc7482def3f89f65b60d96..8fd1852083b6a2227a2b93029e37de721c635675 100644 (file)
@@ -1,3 +1,8 @@
+2008-01-14  Tristan Gingold  <gingold@adacore.com>
+
+       * ld-gc/gc.exp (test_gc): Let missing C compiler make tests
+       "untested" instead of "failed".
+
 2008-01-10  Tristan Gingold  <gingold@adacore.com>
 
        * lib/ld-lib.exp (check_gc_sections_available): Now available on
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"] {