Your new binutils ld tests broke cris-elf without installed target compiler
Tristan Gingold
gingold@adacore.com
Fri Jan 11 20:35:00 GMT 2008
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] {
More information about the Binutils
mailing list