On 2014.03.04 at 13:00 +0100, Richard Biener wrote:
> 
> The following patch addresses the common (?) issue of people
> omitting -flto from the linker command-line which gets more
> severe with GCC 4.9 where slim LTO objects are emitted by
> default.  The patch simply _always_ arranges for the linker
> plugin to be used, so if there are any (slim) LTO objects
> on the link LTO will be done on them.  Similarly the
> non-linker-plugin path in collect2 is adjusted.
> 
> You can still disable this by specifying -fno-lto on the 
> linker command-line.
> 
> One side-effect of enabling the linker-plugin by default
> (for HAVE_LTO_PLUGIN == 2) is that collect2 will then
> use the configured plugin ld rather than the default ld.
> Not sure if that is desired.
> 
> Comments?

I've been using a similar patch (without the collect2.c hunks) locally
for the past few month without any problems.

What is missing is a big fat warning in 
http://gcc.gnu.org/gcc-4.9/changes.html that one should use the gcc
binutils wrappers (gcc-ar, etc.) when building projects with LTO.

-- 
Markus

Reply via email to