public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Binutils failures on cygwin: what about .exe?
@ 2003-02-28 10:56 c.christian.joensson
  2003-03-06 11:33 ` Nick Clifton
  0 siblings, 1 reply; 3+ messages in thread
From: c.christian.joensson @ 2003-02-28 10:56 UTC (permalink / raw)
  To: binutils

I just came to think of the failures of binutils we're seeing on
cygwin, see for example
http://sources.redhat.com/ml/binutils/2003-02/msg00149.html, in some
may be related to the fact that executables have .exe added to them.

For example, looking at
src/binutils/testsuite/binutils-all/objcopy.exp, lines 465 and
forward:

proc copy_executable { prog flags test1 test2 } {

    if [is_remote host] {
	set testfile [remote_download host tmpdir/testprog];
	set testcopy copyprog
    } else {
	set testfile tmpdir/testprog
	set testcopy tmpdir/copyprog
    }
    remote_file host delete $testcopy;

    set exec_output [binutils_run $prog "$flags $testfile $testcopy"]

Could we either have the binutils testsuite always producing .exe
endings for executables (yeah, shouldn't be needed, but makes the
testsuite more portable perhaps) or could we fix the testsuite so that
any system producing .exe endings by default for their executables
also checks for such things, not endingless...

The idea came up looking at the objcopy failures (built 2003-02-28):

Test Run By chj on Fri Feb 28 10:42:55 2003
Native configuration is i686-pc-cygwin

		=== binutils tests ===

<snip>

Executing on host: /usr/local/src/gcc-binutils/trunk/objdir/gcc/xgcc -B/usr/local/src/gcc-binutils/trunk/objdir/gcc/  -c  -o testglue.o /usr/share/dejagnu/testglue.c    (timeout = 300)
spawn /usr/local/src/gcc-binutils/trunk/objdir/gcc/xgcc -B/usr/local/src/gcc-binutils/trunk/objdir/gcc/ -c -o testglue.o /usr/share/dejagnu/testglue.c 

Executing on host: /usr/local/src/gcc-binutils/trunk/objdir/gcc/xgcc -B/usr/local/src/gcc-binutils/trunk/objdir/gcc/ /usr/local/src/gcc-binutils/trunk/src/binutils/testsuite/binutils-all/testprog.c testglue.o  -Wl,-wrap,exit -Wl,-wrap,_exit -Wl,-wrap,main -Wl,-wrap,abort -g     -o tmpdir/testprog    (timeout = 300)
spawn /usr/local/src/gcc-binutils/trunk/objdir/gcc/xgcc -B/usr/local/src/gcc-binutils/trunk/objdir/gcc/ /usr/local/src/gcc-binutils/trunk/src/binutils/testsuite/binutils-all/testprog.c testglue.o -Wl,-wrap,exit -Wl,-wrap,_exit -Wl,-wrap,main -Wl,-wrap,abort -g -o tmpdir/testprog 

spawn [open ...]


*** EXIT code 0
ok
/usr/local/src/gcc-binutils/trunk/objdir/binutils/objcopy  tmpdir/testprog tmpdir/copyprog
Executing on host: /usr/local/src/gcc-binutils/trunk/objdir/binutils/objcopy  tmpdir/testprog tmpdir/copyprog   (timeout = 300)
spawn /usr/local/src/gcc-binutils/trunk/objdir/binutils/objcopy tmpdir/testprog tmpdir/copyprog 

/usr/local/src/gcc-binutils/trunk/objdir/binutils/objcopy: tmpdir/testprog: No such file or directory

/usr/local/src/gcc-binutils/trunk/objdir/binutils/objcopy: tmpdir/testprog: No such file or directory

FAIL: simple objcopy of executable
FAIL: run objcopy of executable
ERROR: remote_download to build of tmpdir/copyprog to tmpdir/striprog: cp: cannot stat `tmpdir/copyprog': No such file or directory

As I understand it, there is a tmpdir/testprog.exe built, but objcopy
looks for a tmpdir/testprog to copy to tmpdir/copyprog. But objcopy
finds nothing and thus the copyprog test fails...

But then agin, I might understand things wrong...

Ideas?

Cheers,

/ChJ

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

* Re: Binutils failures on cygwin: what about .exe?
  2003-02-28 10:56 Binutils failures on cygwin: what about .exe? c.christian.joensson
@ 2003-03-06 11:33 ` Nick Clifton
  2003-03-06 17:39   ` Rob Savoye
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Clifton @ 2003-03-06 11:33 UTC (permalink / raw)
  To: c.christian.joensson; +Cc: binutils, dejagnu

Hi ChJ,

> I just came to think of the failures of binutils we're seeing on
> cygwin, see for example
> http://sources.redhat.com/ml/binutils/2003-02/msg00149.html, in some
> may be related to the fact that executables have .exe added to
> them.
> 
> For example, looking at
> src/binutils/testsuite/binutils-all/objcopy.exp, lines 465 and
> forward:
> 
> proc copy_executable { prog flags test1 test2 } {
> 
>     if [is_remote host] {
> 	set testfile [remote_download host tmpdir/testprog];
> 	set testcopy copyprog
>     } else {
> 	set testfile tmpdir/testprog
> 	set testcopy tmpdir/copyprog
>     }
>     remote_file host delete $testcopy;
> 
>     set exec_output [binutils_run $prog "$flags $testfile $testcopy"]
> 
> Could we either have the binutils testsuite always producing .exe
> endings for executables (yeah, shouldn't be needed, but makes the
> testsuite more portable perhaps) or could we fix the testsuite so that
> any system producing .exe endings by default for their executables
> also checks for such things, not endingless...

Another possibility would be to add code to 'proc remote_download'
that tests for the existence of 'file'.  If it does not but 'file.exe'
does exist then it could automatically add the .exe extension.  That
way the problem would cured for all testsuites that create executables
and download them to a Cygwin host, not just this particular test
script.

Cheers
        Nick

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

* Re: Binutils failures on cygwin: what about .exe?
  2003-03-06 11:33 ` Nick Clifton
@ 2003-03-06 17:39   ` Rob Savoye
  0 siblings, 0 replies; 3+ messages in thread
From: Rob Savoye @ 2003-03-06 17:39 UTC (permalink / raw)
  To: Nick Clifton; +Cc: c.christian.joensson, dejagnu, binutils

On Thu, Mar 06, 2003 at 11:36:08AM +0000, Nick Clifton wrote:

> > Could we either have the binutils testsuite always producing .exe
> > endings for executables (yeah, shouldn't be needed, but makes the
> > testsuite more portable perhaps) or could we fix the testsuite so that
> > any system producing .exe endings by default for their executables
> > also checks for such things, not endingless...
> 
> Another possibility would be to add code to 'proc remote_download'
> that tests for the existence of 'file'.  If it does not but 'file.exe'
> does exist then it could automatically add the .exe extension.  That
> way the problem would cured for all testsuites that create executables
> and download them to a Cygwin host, not just this particular test

  I guess this would a reasonable tweak, to load a file with or without
the .exe. But seriously, I do think all cygwin executables should have a
.exe extension. I added support for the .exe suffix this many years ago,
and I'm suprised to hear some executables don't have the .exe added. I
can make this change to remote_download, but I'd also think that the
binutils testsuite needs to be fixed as well, unless there is a valid reason
to not add the .exe extension.

	- rob -

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

end of thread, other threads:[~2003-03-06 17:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-28 10:56 Binutils failures on cygwin: what about .exe? c.christian.joensson
2003-03-06 11:33 ` Nick Clifton
2003-03-06 17:39   ` Rob Savoye

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