Configuring GCC with --with-gnu-ld can improve the handling of @-files:
Only when the driver knows that the GNU linker is used, it will put options / objects for linking in @-file. This may be required on Windows when the inflated command line is too long for Windows. The behaviour of collect2 also depends on that flag: When the driver calls collect2 for linking with an @-file, collect2 will call ld with an @-file only with the GNU linker.
The configure scripts can't always work this out, e.g. for canadian-cross builds, because configure cannot call the host's ld.exe.
Configuring GCC with
--with-gnu-ld
can improve the handling of @-files:Only when the driver knows that the GNU linker is used, it will put options / objects for linking in @-file. This may be required on Windows when the inflated command line is too long for Windows. The behaviour of
collect2
also depends on that flag: When the driver callscollect2
for linking with an @-file,collect2
will callld
with an @-file only with the GNU linker.The configure scripts can't always work this out, e.g. for canadian-cross builds, because configure cannot call the host's
ld.exe
.