public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Your new binutils ld tests broke cris-elf without installed target compiler
@ 2008-01-11 19:28 Hans-Peter Nilsson
  2008-01-11 20:35 ` Tristan Gingold
  0 siblings, 1 reply; 7+ messages in thread
From: Hans-Peter Nilsson @ 2008-01-11 19:28 UTC (permalink / raw)
  To: gingold, ebotcazou; +Cc: binutils

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).

brgds, H-P

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Your new binutils ld tests broke cris-elf without installed target compiler
  2008-01-11 19:28 Your new binutils ld tests broke cris-elf without installed target compiler Hans-Peter Nilsson
@ 2008-01-11 20:35 ` Tristan Gingold
  2008-01-11 20:44   ` Hans-Peter Nilsson
  0 siblings, 1 reply; 7+ messages in thread
From: Tristan Gingold @ 2008-01-11 20:35 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: ebotcazou, binutils


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Your new binutils ld tests broke cris-elf without installed target compiler
  2008-01-11 20:35 ` Tristan Gingold
@ 2008-01-11 20:44   ` Hans-Peter Nilsson
  2008-01-11 22:58     ` Tristan Gingold
  0 siblings, 1 reply; 7+ messages in thread
From: Hans-Peter Nilsson @ 2008-01-11 20:44 UTC (permalink / raw)
  To: gingold; +Cc: hans-peter.nilsson, ebotcazou, binutils

> From: Tristan Gingold <gingold@adacore.com>
> Date: Fri, 11 Jan 2008 16:58:01 +0100

> 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).

You'd still get the ERROR, so I suggest testing for existence of
CC instead, like selective.exp.

brgds, H-P

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Your new binutils ld tests broke cris-elf without installed target compiler
  2008-01-11 20:44   ` Hans-Peter Nilsson
@ 2008-01-11 22:58     ` Tristan Gingold
  2008-01-13  6:02       ` Hans-Peter Nilsson
  0 siblings, 1 reply; 7+ messages in thread
From: Tristan Gingold @ 2008-01-11 22:58 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: ebotcazou, binutils


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Your new binutils ld tests broke cris-elf without installed target compiler
  2008-01-11 22:58     ` Tristan Gingold
@ 2008-01-13  6:02       ` Hans-Peter Nilsson
  2008-01-16  8:48         ` Hans-Peter Nilsson
  0 siblings, 1 reply; 7+ messages in thread
From: Hans-Peter Nilsson @ 2008-01-13  6:02 UTC (permalink / raw)
  To: gingold; +Cc: hans-peter.nilsson, ebotcazou, binutils

> From: Tristan Gingold <gingold@adacore.com>
> Date: Fri, 11 Jan 2008 17:27:41 +0100

> 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.

Generally looks ok, but your mailer botches tabs and...

> *** ld/testsuite/ld-gc/gc.exp   11 Jan 2008 09:11:18 -0000      1.1

>        if ![ld_simple_link $linker $outfile "-L$srcdir/$subdir  
> $ldflags $objfile"] {
> !       fail $testname

... I removed this spurious (and wrong) indentation part of the
patch when I tested.  Actually I just edited the original
gc.exp, as in the following diff:

--- x/binutils_checkout/ld/testsuite/ld-gc/gc.exp	Fri Jan 11 10:11:18 2008
+++ ./gc.exp	Fri Jan 11 17:50:35 2008
@@ -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
@@ -35,6 +37,11 @@ proc test_gc { testname filename linker 
     global subdir
     global nm_output
     global objfile
+
+    if ![file readable $objfile ] {
+	untested $testname
+	return
+    }
 
     set outfile "tmpdir/$filename"
 

thanks.

brgds, H-P

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Your new binutils ld tests broke cris-elf without installed target compiler
  2008-01-13  6:02       ` Hans-Peter Nilsson
@ 2008-01-16  8:48         ` Hans-Peter Nilsson
  2008-01-18  7:15           ` Tristan Gingold
  0 siblings, 1 reply; 7+ messages in thread
From: Hans-Peter Nilsson @ 2008-01-16  8:48 UTC (permalink / raw)
  To: gingold; +Cc: hans-peter.nilsson, ebotcazou, binutils

> Date: Fri, 11 Jan 2008 18:09:45 +0100
> From: Hans-Peter Nilsson <hp@axis.com>

> > From: Tristan Gingold <gingold@adacore.com>
> > Date: Fri, 11 Jan 2008 17:27:41 +0100
> 
> > 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.
> 
> Generally looks ok, but your mailer botches tabs and...
> 
> > *** ld/testsuite/ld-gc/gc.exp   11 Jan 2008 09:11:18 -0000      1.1
> 
> >        if ![ld_simple_link $linker $outfile "-L$srcdir/$subdir  
> > $ldflags $objfile"] {
> > !       fail $testname
> 
> ... I removed this spurious (and wrong) indentation part of the
> patch when I tested.  Actually I just edited the original
> gc.exp, as in the following diff:

Committed as obvious on your behalf, except I simply had to
tweak the ChangeLog entry to the recommended imperative form:

	* ld-gc/gc.exp (test_gc): Let missing C compiler make tests
	"untested" instead of "failed".

brgds, H-P

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Your new binutils ld tests broke cris-elf without installed target compiler
  2008-01-16  8:48         ` Hans-Peter Nilsson
@ 2008-01-18  7:15           ` Tristan Gingold
  0 siblings, 0 replies; 7+ messages in thread
From: Tristan Gingold @ 2008-01-18  7:15 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: ebotcazou, binutils


On Jan 14, 2008, at 8:55 PM, Hans-Peter Nilsson wrote:
> Committed as obvious on your behalf, except I simply had to
> tweak the ChangeLog entry to the recommended imperative form:
>
> 	* ld-gc/gc.exp (test_gc): Let missing C compiler make tests
> 	"untested" instead of "failed".

perfect and thanks.

Tristan.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-01-16  8:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-11 19:28 Your new binutils ld tests broke cris-elf without installed target compiler Hans-Peter Nilsson
2008-01-11 20:35 ` Tristan Gingold
2008-01-11 20:44   ` Hans-Peter Nilsson
2008-01-11 22:58     ` Tristan Gingold
2008-01-13  6:02       ` Hans-Peter Nilsson
2008-01-16  8:48         ` Hans-Peter Nilsson
2008-01-18  7:15           ` Tristan Gingold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).