Your new binutils ld tests broke cris-elf without installed target compiler

Tristan Gingold gingold@adacore.com
Fri Jan 11 22:58:00 GMT 2008


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] {



More information about the Binutils mailing list