[patch] Fix PR ada/52362

Paolo Bonzini bonzini@gnu.org
Fri May 25 07:23:00 GMT 2012


Il 18/05/2012 23:05, Eric Botcazou ha scritto:
> Hi,
> 
> this is a regression present on mainline and 4.7 branch or, more precisely, if 
> you use recent GNU linkers with LTO plugin.  During the link phase, gnatlink 
> can decide to use a response file to pass a very long line to the linker.  It 
> was actually using a linker script with the GNU linker, but this doesn't work 
> in LTO mode if you use the plugin.
> 
> The fix is mainly in the Ada tools, but there is a hitch: when you pass a 
> response file to the linker by means of the -Wl,@ option, it is intercepted by 
> collect2.  And collect2 creates another response file for the linker proper 
> only if HAVE_GNU_LD is set to 1.  Now HAVE_GNU_LD is set to 1 only if you pass 
> the --with-ld= or --with-gnu-ld switches at configure time; in particular, for 
> systems where the use of the GNU linker is the only choice and thus hardcoded 
> in config.gcc (e.g. Linux), you can end up with HAVE_GNU_LD set to 0, breaking 
> the response file mechanism.  Hence the configure.ac hunk.
> 
> Tested on i586-suse-linux and i686-pc-mingw32, OK for mainline and 4.7 branch?

Ok, thanks!

Paolo



More information about the Gcc-patches mailing list