From 3becfab9d2c41dba985c184dfd0df46314ef6b13 Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Mon, 14 Jan 2008 19:52:43 +0000 Subject: [PATCH] * ld-gc/gc.exp (test_gc): Let missing C compiler make tests "untested" instead of "failed". --- ld/testsuite/ChangeLog | 5 +++++ ld/testsuite/ld-gc/gc.exp | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index c11355cc69..8fd1852083 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-01-14 Tristan Gingold + + * ld-gc/gc.exp (test_gc): Let missing C compiler make tests + "untested" instead of "failed". + 2008-01-10 Tristan Gingold * lib/ld-lib.exp (check_gc_sections_available): Now available on diff --git a/ld/testsuite/ld-gc/gc.exp b/ld/testsuite/ld-gc/gc.exp index 68a0ba1164..acadcba38b 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"] { -- 2.34.1