Long Command Lines and @FILE

Christian Groessler chris@groessler.org
Thu Sep 16 19:17:10 GMT 2021


On 9/16/21 20:55, Joel Sherrill wrote:
> On Thu, Sep 16, 2021, 1:08 PM DJ Delorie <dj@redhat.com> wrote:
>
>> As an additional tidbit, this feature was added for DJGPP as DOS command
>> lines are limited to 128 bytes (I got the idea from Borland, IIRC).  I
>> vaguely recall that other platforms were starting to hit command line
>> limits, and the feature was added to libiberty for general use.
>>
> That's an awesome piece of historical trivia.
>
> A secondary challenge is getting the build system to write the file without
> using a different command which trips the limit. I assume at least GNU make
> can do some iteration with maybe foreach and shell that would let you write
> a file with a list of objects.


In the mid to late 90s we were using "MKS make" at my work. It had a way 
to automatically generate such @FILE files from within the makefile. 
Similar to shell "here commands" IIRC.

When we moved to GNU make, changing the makefiles for this project was 
quite some work. Since this was one of many projects back then and the 
only one with this problem, and for DOS, the pain never hurt so much 
that I would have decided to implement something similar in gmake.

regards,
chris



More information about the Binutils mailing list