Mark Mitchell wrote: > Tristan Wibberley wrote: > >> Mark Mitchell wrote: >> >> >> >>> However, there's demonstrable interest in this feature for GNU/Linux as >>> well, from the lists, and for Java on all operating systems. >>> >> >> >> Please don't use '@filename' on Linux, use a normal switch with an >> argument. The problems of '-' being used for switches is bad enough >> without another valid filename character being overloaded. At least the >> '-' problem is well understood and people can avoid using filenames >> beginning with '-'. > > > Again, I'm amenable to changes to the technical details. > > The first step is agreeing that (a) the feature is beneficial, and (b) > the mechanism for implementing it, such as whether it should be done in > crt0 or in libiberty. I think everyone's agreed on (a), but I don't > think DJ and I are yet seeing eye-to-eye on (b). Once we get past that, > we can work out these details.
I certainly agree with (a). For (b), I think a gcc compiler that is intended to produce normal Windows binaries should have the same commandline interface as Microsoft's compiler (I mean *all* of the commandline interface) - for build scripts and development environments that expect to see Micrsoft's tools. If it also provides a gcc commandline interface, it should look exectly like the *NIX gcc, and long commandlines could be supported by *NIX style shells that use CreateProcess wrappers such as exec to use IPC to pass the cmdline (where libcrt handles it). So if you use normal Windows tools to build, you can use the MS style cmdline, and if you use ported GNU tools, you can use the GNU style commandline (and both shell, make, etc. and compiler contain specific support for long commandline via IPC). More work, its true, but its also much nicer (IMHO). My justification is that Windows programmers expect to use /F /OO:bar and @argsfile commandline arguments from cmd, and Linux developers working on Windows expect to use -f --oo=bar and --args=argsfile commandline arguments from bash. So that is what they respectively ought to be given. In the case of the GNU interface, it looks like the shell and compiler are capable of long commandlines... use Microsoft counterparts for either and you lose the facility and can fall back to --args= or @. When GNU utilities are ported, libcrt and exec can understand the long commandline method, when new programs are written they can use an LGPL libWinGNU.dll that contains such functions as LongCreateProcess (or link to a dll that contains its own CreateProcess or something). -- Tristan Wibberley Opinions expressed are my own and do not necessarily coincide with those of my employer, etc.