delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/06/11/00:27:05

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE
X-Spam-Check-By: sourceware.org
X-Mail-Handler: MailHop Outbound by DynDNS
X-Report-Abuse-To: abuse AT dyndns DOT com (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information)
X-MHO-User: U2FsdGVkX18DIzb9wul/g40Mxqp0UfuE
Date: Mon, 11 Jun 2012 00:26:37 -0400
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: make: .exe handling breaks kernel cross-compile
Message-ID: <20120611042637.GB590@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <4FD4E21A DOT 2080809 AT users DOT sourceforge DOT net> <20120610182927 DOT GB32575 AT ednor DOT casa DOT cgf DOT cx> <4FD50A3D DOT 9040201 AT users DOT sourceforge DOT net>
MIME-Version: 1.0
In-Reply-To: <4FD50A3D.9040201@users.sourceforge.net>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019