public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* make: .exe handling breaks kernel cross-compile
@ 2012-06-10 18:06 Yaakov (Cygwin/X)
  2012-06-10 18:29 ` Christopher Faylor
  0 siblings, 1 reply; 6+ messages in thread
From: Yaakov (Cygwin/X) @ 2012-06-10 18:06 UTC (permalink / raw)
  To: cygwin

I can confirm that this previously reported bug in make .exe handling 
still affects the cross-compile of the Linux kernel:

http://cygwin.com/ml/cygwin/2009-11/msg00935.html


Yaakov

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: make: .exe handling breaks kernel cross-compile
  2012-06-10 18:06 make: .exe handling breaks kernel cross-compile Yaakov (Cygwin/X)
@ 2012-06-10 18:29 ` Christopher Faylor
  2012-06-10 20:57   ` Yaakov (Cygwin/X)
  0 siblings, 1 reply; 6+ messages in thread
From: Christopher Faylor @ 2012-06-10 18:29 UTC (permalink / raw)
  To: cygwin

On Sun, Jun 10, 2012 at 01:06:18PM -0500, Yaakov (Cygwin/X) wrote:
>I can confirm that this previously reported bug in make .exe handling 
>still affects the cross-compile of the Linux kernel:
>
>http://cygwin.com/ml/cygwin/2009-11/msg00935.html

Without diving into the depths of the linux makefiles, this doesn't seem
like a bug.  gcc creates .exe files.  The makefile isn't expecting to
create one and, so, gets confused.  Makefiles which expect .exe
extensions usually use the EXEEXT variable for just this purpose.
Linux's makefile doesn't do that for probably obvious reasons.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: make: .exe handling breaks kernel cross-compile
  2012-06-10 18:29 ` Christopher Faylor
@ 2012-06-10 20:57   ` Yaakov (Cygwin/X)
  2012-06-11  4:26     ` Christopher Faylor
  0 siblings, 1 reply; 6+ messages in thread
From: Yaakov (Cygwin/X) @ 2012-06-10 20:57 UTC (permalink / raw)
  To: cygwin

On 2012-06-10 13:29, Christopher Faylor wrote:
> On Sun, Jun 10, 2012 at 01:06:18PM -0500, Yaakov (Cygwin/X) wrote:
>> I can confirm that this previously reported bug in make .exe handling
>> still affects the cross-compile of the Linux kernel:
>>
>> http://cygwin.com/ml/cygwin/2009-11/msg00935.html
>
> Without diving into the depths of the linux makefiles, this doesn't seem
> like a bug.  gcc creates .exe files.  The makefile isn't expecting to
> create one and, so, gets confused.  Makefiles which expect .exe
> extensions usually use the EXEEXT variable for just this purpose.
> Linux's makefile doesn't do that for probably obvious reasons.

While our make won't connect a dep on "foo" to a foo.exe rule (which can 
occur in automake-generated Makefiles with custom rules), it does see 
foo.exe fulfilling a dep on "foo" if it is already present:

$ cat Makefile
all: bar
bar: foo
	touch bar.exe
clean:
	rm -f bar.exe foo.exe

$ touch foo.exe
$ make
touch bar.exe
$ make clean
rm -f bar.exe foo.exe

The problem here is the kernel uses VPATH -- scripts/pnmtologo(.exe) is 
not relative to drivers/video/logo, but rather to $(O) -- and somehow 
with VPATH the .exe magic doesn't happen:

$ cat Makefile
VPATH = $(PWD)/build

all: bar
bar: foo
	touch bar.exe

$ mkdir -p build
$ touch build/foo.exe
$ make
make: *** No rule to make target `foo', needed by `bar'.  Stop.

So foo.exe fulfills foo, but not with VPATH.  Isn't that a bug?


Yaakov

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: make: .exe handling breaks kernel cross-compile
  2012-06-10 20:57   ` Yaakov (Cygwin/X)
@ 2012-06-11  4:26     ` Christopher Faylor
  2012-06-11  6:04       ` Yaakov (Cygwin/X)
  0 siblings, 1 reply; 6+ messages in thread
From: Christopher Faylor @ 2012-06-11  4:26 UTC (permalink / raw)
  To: cygwin

On Sun, Jun 10, 2012 at 03:57:33PM -0500, Yaakov (Cygwin/X) wrote:
>On 2012-06-10 13:29, Christopher Faylor wrote:
>> On Sun, Jun 10, 2012 at 01:06:18PM -0500, Yaakov (Cygwin/X) wrote:
>>> I can confirm that this previously reported bug in make .exe handling
>>> still affects the cross-compile of the Linux kernel:
>>>
>>> http://cygwin.com/ml/cygwin/2009-11/msg00935.html
>>
>> Without diving into the depths of the linux makefiles, this doesn't seem
>> like a bug.  gcc creates .exe files.  The makefile isn't expecting to
>> create one and, so, gets confused.  Makefiles which expect .exe
>> extensions usually use the EXEEXT variable for just this purpose.
>> Linux's makefile doesn't do that for probably obvious reasons.
>
>While our make won't connect a dep on "foo" to a foo.exe rule (which can 
>occur in automake-generated Makefiles with custom rules), it does see 
>foo.exe fulfilling a dep on "foo" if it is already present:
>
>$ cat Makefile
>all: bar
>bar: foo
>	touch bar.exe
>clean:
>	rm -f bar.exe foo.exe
>
>$ touch foo.exe
>$ make
>touch bar.exe
>$ make clean
>rm -f bar.exe foo.exe
>
>The problem here is the kernel uses VPATH -- scripts/pnmtologo(.exe) is 
>not relative to drivers/video/logo, but rather to $(O) -- and somehow 
>with VPATH the .exe magic doesn't happen:
>
>$ cat Makefile
>VPATH = $(PWD)/build
>
>all: bar
>bar: foo
>	touch bar.exe
>
>$ mkdir -p build
>$ touch build/foo.exe
>$ make
>make: *** No rule to make target `foo', needed by `bar'.  Stop.
>
>So foo.exe fulfills foo, but not with VPATH.  Isn't that a bug?

If there is a bug it is with make ever equating foo.exe with foo.  It's
undoubtedly happening because of Cygwin's attempts at transparency.

I'm not kidding about EXEEXT.  Surely you know about this from having
maintained cygport.

cgf

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: make: .exe handling breaks kernel cross-compile
  2012-06-11  4:26     ` Christopher Faylor
@ 2012-06-11  6:04       ` Yaakov (Cygwin/X)
  2012-06-11 14:43         ` Christopher Faylor
  0 siblings, 1 reply; 6+ messages in thread
From: Yaakov (Cygwin/X) @ 2012-06-11  6:04 UTC (permalink / raw)
  To: cygwin

On 2012-06-10 23:26, Christopher Faylor wrote:
> If there is a bug it is with make ever equating foo.exe with foo.  It's
> undoubtedly happening because of Cygwin's attempts at transparency.
>
> I'm not kidding about EXEEXT.  Surely you know about this from having
> maintained cygport.

Am I ever, but I suspect *you* know that incorporating EXEEXT into the 
Linux kernel buildsystem will likely never be accepted upstream.

That being said, I do have another patch which might have a chance, so 
the last hurdle from our side is in regex, per my previous thread.


Yaakov


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: make: .exe handling breaks kernel cross-compile
  2012-06-11  6:04       ` Yaakov (Cygwin/X)
@ 2012-06-11 14:43         ` Christopher Faylor
  0 siblings, 0 replies; 6+ messages in thread
From: Christopher Faylor @ 2012-06-11 14:43 UTC (permalink / raw)
  To: cygwin

On Mon, Jun 11, 2012 at 01:04:22AM -0500, Yaakov (Cygwin/X) wrote:
>>
>On 2012-06-10 23:26, Christopher Faylor wrote:
>> If there is a bug it is with make ever equating foo.exe with foo.  It's
>> undoubtedly happening because of Cygwin's attempts at transparency.
>>
>> I'm not kidding about EXEEXT.  Surely you know about this from having
>> maintained cygport.
>
>Am I ever, but I suspect *you* know that incorporating EXEEXT into the 
>Linux kernel buildsystem will likely never be accepted upstream.

>>On 2012-06-10 14:29, Christopher Faylor wrote:
>>>Makefiles which expect .exe extensions usually use the EXEEXT variable
>>>for just this purpose.  Linux's makefile doesn't do that for probably
>>>obvious reasons.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

end of thread, other threads:[~2012-06-11 14:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-10 18:06 make: .exe handling breaks kernel cross-compile Yaakov (Cygwin/X)
2012-06-10 18:29 ` Christopher Faylor
2012-06-10 20:57   ` Yaakov (Cygwin/X)
2012-06-11  4:26     ` Christopher Faylor
2012-06-11  6:04       ` Yaakov (Cygwin/X)
2012-06-11 14:43         ` Christopher Faylor

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