This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] pass @-files to collect2 and beyond


On 4/13/07, Nathan Froyd <froydnj@codesourcery.com> 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. That is: + fprintf (temp_fp, "%s\n", outfiles[i]); Should be + 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.

Thanks,
Andrew Pinski


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]