Enable -fuse-linker-plugin by default when possible

Jan Hubicka hubicka@ucw.cz
Mon Nov 29 16:15:00 GMT 2010


> On Sun, Nov 28, 2010 at 1:59 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
> > Hi,
> > this patch makes us to enable -fuse-linker-plugin by default when LTO is
> > enabled and (plugin)ld support plugins. This was discussed at the GCC Summit
> > BOF as change we want to make to avoid user confussion.
> > (plugin enabled LTO behaves a lot saner by not requiring -fwhole-program for
> > good optimizations and by not silently ignoring LTO objects in archives)
> >
> > The decision whether to build linker plugin is made by toplevel configure,
> > while logic about plugin ld is in gcc configure.  So I pass decision of
> > toplevel configure as --with-plugin=yes into gcc configure and added logic
> > autodetecting presence of --plugin-opt command line option or testing whether
> > we build with in-tree gold or resonably recent GNU ld.
> >
> 
> I'd like to point out that the current linker plugin implementation is a hack,
> not a real solution:
> 
> http://sourceware.org/bugzilla/show_bug.cgi?id=12248
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42690
> 
> Can we fix it properly before enabling it by default?

I certainly do hope that these issues will be solved.  There are also issues with handling
COMDATs.

However the collect2 code is greater hack than plugin code, so enabling it by
default still seems an improvement.

Honza
> 
> 
> -- 
> H.J.



More information about the Gcc-patches mailing list