This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] pass @-files to collect2 and beyond
On 4/13/07, Nathan Froyd <firstname.lastname@example.org> wrote:
The attached patch adds special handling to the gcc driver and collect2
to pass @-file arguments to collect2 and subprocesses, respectively,
when they are passed @-file arguments. The motivation behind this is to
avoid argv limits on some systems and/or large compiles.
Only problem is that if you do this, it will not work if you have a
GCC that understands @ but an as/ld that does not understand @. Maybe
you need more magic than what you gave.
Also I think you might need to quote arguments in the response files.
+ fprintf (temp_fp, "%s\n", outfiles[i]);
+ fprintf (temp_fp, "\"%s\"\n", outfiles[i]);
Also you have to make sure that '\' is translated to '"\\" when
printing out the response file, otherwise it is treated as something
different when reading it in.
Note this is learned for experience while doing the same for the PS3 toolchain.