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 16:58:01 +0100
- Subject: Re: Your new binutils ld tests broke cris-elf without installed target compiler
- References: <200801111539.m0BFd2vS031934@ignucius.se.axis.com>
On Jan 11, 2008, at 4:39 PM, Hans-Peter Nilsson wrote:
In my binutils autotester, I now see:
Running /tmp/hpautotest-binutils/bsrc/src/ld/testsuite/ld-gc/
gc.exp ...
ERROR: cris-axis-elf-cc does not exist
FAIL: Check --gc-section/-q
FAIL: Check --gc-section/-r/-e
FAIL: Check --gc-section/-r/-u
with ld.log not adding anything useful (the tests fail due to
gc.o not existing due to $target-cc not being there).
The target compiler is supposed to be optional when running the
binutils tests. See other parts of the testsuite,
e.g. ld/testsuite/ld-selective/selective.exp (but use $CC for C,
not $CXX).
Does this patch help ? (Seems to work for me).
If so, can it be committed as obvious ?
Tristan.
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 15:50:43 -0000
***************
*** 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] {
--- 36,50 ----
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] {