This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Your new binutils ld tests broke cris-elf without installed target compiler
- From: Tristan Gingold <gingold at adacore dot com>
- To: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Cc: ebotcazou at adacore dot com, binutils at sourceware dot org
- Date: Fri, 11 Jan 2008 17:27:41 +0100
- Subject: Re: Your new binutils ld tests broke cris-elf without installed target compiler
- References: <200801111611.m0BGBNo0032474@ignucius.se.axis.com>
On Jan 11, 2008, at 5:11 PM, Hans-Peter Nilsson wrote:
You'd still get the ERROR, so I suggest testing for existence of
CC instead, like selective.exp.
Ok, so second try:
ld/testsuite:
2008-01-11 Tristan Gingold <gingold@adacore.com>
* ld-gc/gc.exp (test_gc): Missing C compiler makes tests untested
instead of failed.
*** ld/testsuite/ld-gc/gc.exp 11 Jan 2008 09:11:18 -0000 1.1
--- ld/testsuite/ld-gc/gc.exp 11 Jan 2008 16:20:48 -0000
***************
*** 27,33 ****
set cflags "-ffunction-sections -fdata-sections"
set objfile "tmpdir/gc.o"
! ld_compile "$CC -c $CFLAGS $cflags" $srcdir/$subdir/gc.c $objfile
proc test_gc { testname filename linker ldflags} {
global nm
--- 27,35 ----
set cflags "-ffunction-sections -fdata-sections"
set objfile "tmpdir/gc.o"
! 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,45 ****
global nm_output
global objfile
set outfile "tmpdir/$filename"
if ![ld_simple_link $linker $outfile "-L$srcdir/$subdir
$ldflags $objfile"] {
! fail $testname
return
}
if ![ld_nm $nm "" $outfile] {
--- 38,52 ----
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"] {
! fail $testname
return
}
if ![ld_nm $nm "" $outfile] {