Enable -fuse-linker-plugin by default when possible

Jan Hubicka hubicka@ucw.cz
Mon Nov 29 14:22:00 GMT 2010


> On 11/29/2010 01:11 PM, Jan Hubicka wrote:
>> >  Can you instead add a dependency of configure-gcc on
>> >  configure-lto-plugin and use "test -f ../lto-plugin/Makefile" to detect
>> >  whether the plugin is in use?
>>
>> Hmm, OK, it seems bit hacky but easier than extra --with option...
>> Will do that.
>
> It is a bit hacky.  However, I'm starting to think that everything that  
> is added to the toplevel configure.ac is "very" hacky, so checking for  
> the Makefile is still better. :)

Indeed, updating autogened Makefile template and toplevel configury was no fun.
I spent couple days looking into this problem...

I however run into new problem. With plugin enabled libtool breaks.  It is because
it uses gcc --verbose to work out objects that need to be added to linker command
line (crtbegin and crtend).

Because plugin in collect2 imply verbose output, we now output two lines that
match libtools egrep "\-L". One is collect2 command line, other is command line
calling collect-ld.  Consequently libtool adds every object twice that has
interesting ill effects.

I guess libtool should be updated to parse the output more safely, but still we
would break existing libtool setups that is bad enough. So I guess I will disable
this code implying verbose flag in collect2 on LTO?  Perhaps it is just remainder
of some debugging session.  We still get the output with -Wl,-v

Honza
>
> Paolo



More information about the Gcc-patches mailing list