www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/12/23/18:35:20

From: cgf AT cygnus DOT com (Christopher Faylor)
Subject: Re: gcc --print-file-name: win32 or posix?
23 Dec 1998 18:35:20 -0800 :
Message-ID: <19981223211411.B27371.cygnus.cygwin32.developers@cygnus.com>
References: <199812230227 DOT VAA02263 AT envy DOT delorie DOT com>
Mime-Version: 1.0
To: Mumit Khan <khan AT xraylith DOT wisc DOT edu>, DJ Delorie <dj AT delorie DOT com>
Cc: cygwin32-developers AT cygnus DOT com

On Wed, Dec 23, 1998 at 04:07:07PM -0600, Mumit Khan wrote:
>DJ Delorie <dj AT delorie DOT com> writes:
>> 
>> If you do "gcc --print-file-name libgcc.a" cygwin's gcc currently
>> prints the result using Win32 paths.  This breaks cygwin's make.  We
>> were just about to change it to print posix paths, but we realized
>> that it was done this way for a reason, and there are cases where it
>> makes sense to print win32 paths.
>
>I and others (notably Earnie Boyd) have this raised issue in the past
>without much response from others, so I'm glad we're finally going to deal
>with it. 

I have noted your concern.  I'm sorry that I never actually said anything
"out loud" about it but it was brought up at a Win32 meeting.

>Can you tell us why it was done? I've asked this in the past, but never
>did get an answer.

I don't understand it either.  I think that Geoff made the change but he
is on vacation now, so we'll have to wait until he gets back for the
definitive answer.

>> We thought about using -mcygwin or -mmingw to trigger the output type,
>> but those only work for native gcc's - they won't work if the gcc is
>> host=cygwin but a different target (the -m options are
>> target-specific, not host-specific).
>> 
>> My thought was that if gcc was built for a cygwin host, chances are,
>> the other tools were also, so posix paths make sense, and if gcc is
>> built with non-cygwin, chances are the other tools were too, so native
>> paths make sense.
>> 
>> Can anyone think of other possible solutions or caveats?
>
>My approach may seem a bit harsh, but I believe it's quite reasonable. 
>Folks who want to use Cygwin hosted toolchain for whatever target should 
>expect posix pathnames and use tools that do the right thing. If they 
>want native pathname, they can simply write a simple filter (using 
>cygpath for example) that do the munging for them. If you consider 
>Windows32 to be an embedded target like I do, it all makes sense ;-)
>
>I doubt if we can satisfy everybody, so we should just go with the right
>thing (which is of course always subjective).

I tend to agree.  I thought that there might be someone somewhere who
actually needs the c:\foo style pathnames.  If that's not the case then
lets just get rid of the MS-DOS filenames.  I think gcc is the only
tool that does things this way.  Or does ld do this too?

-chris

- Raw text -


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