4.2 Project: "@file" support
Mark Mitchell
mark@codesourcery.com
Thu Aug 25 15:08:00 GMT 2005
DJ Delorie wrote:
>>I'm not sure how I can "fix MinGW"; see above. Also, if a MinGW
>>application wants to invoke some other Windows program, the behavior
>>should be the same as if I compiled that application with Visual C, or
>>Intel's C compiler, or whatever; if we were using magic to pass
>>command-line arguments, we'd be breaking things.
> My suggestion is to take the patch you are proposing, and add it
> instead to MinGW's crt0 code. That way, *ALL* applications built with
> MinGW would support @file on the command line, not just gcc.
But, that would change the behavior for applications that may not want
that. That's what I was trying to communicate above. One of the
benefits of MinGW is that you can write code that compiles and behaves
identically with MSVC, ICC, or GCC. If we did as you suggest, we would
violate that invariant.
A similar argument would apply to the shell-script stuff that was just
added to libiberty. Why not just have MinGW wrap CreateProcess and do
shebang handling there? Because only some applications what that
functionality.
I agree that it would be technically feasible to create a different
version of MinGW crt0 code that users could optionally select when they
want @-file behavior in an application. (Of course, we could do that
for shebang handling too.)
However, there's demonstrable interest in this feature for GNU/Linux as
well, from the lists, and for Java on all operating systems.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304
More information about the Gcc
mailing list