[PATCH] Updated LTO early debug patch
Richard Biener
rguenther@suse.de
Tue Sep 1 08:22:00 GMT 2015
On Tue, 1 Sep 2015, Markus Trippelsdorf wrote:
> On 2015.09.01 at 10:00 +0200, Richard Biener wrote:
> > On Mon, 31 Aug 2015, Markus Trippelsdorf wrote:
> >
> > > On 2015.08.31 at 16:44 +0200, Richard Biener wrote:
> > > >
> > > > So the state below now will pass LTO bootstrap (fingers crossing,
> > > > stage3 running) as well as regular bootstrap. Iff I didn't break
> > > > sth in the last minute. You need up-to-date trunk (watch out,
> > > > fortran seems to be broken) to pull the fixes for trunk LTO bootstrap.
> > >
> > > Gold doesn't work at all (internal error in read_script_file, at script.cc:1608).
> > >
> > > Even simple programs don't link anymore:
> > >
> > > trippels@gcc2-power8 ~ % echo "int main () {}" | g++ -x c++ - -flto
> > > /home/trippels/bin/ld: /home/trippels/tmp/ccPhF9Ar.o: plugin needed to handle lto object
> > > /home/trippels/bin/ld: /home/trippels/tmp/ccjOv4bXdebugobj: plugin needed to handle lto object
> >
> > Ah, I didn't notice that because I failed to pass -fuse-ld=gold to the
> > linker command doing the incremental debug link (and my default linker
> > is GNU ld). With that fixed I can reproduce the error.
>
> The "plugin needed to handle lto object" also happen when using ld.bfd,
> because you pass -fno-use-linker-plugin. Both linkers depend on
> autoloading liblto_plugin.so.0.0.0 from lib/bfd-plugins.
Yes, I know. But it "works" with GNU ld, probably because of
/* Support -fno-use-linker-plugin by failing to load the plugin
for the case where it is auto-loaded by BFD. */
char *collect_gcc_options = getenv ("COLLECT_GCC_OPTIONS");
if (collect_gcc_options
&& (strstr (collect_gcc_options, "'-fno-use-linker-plugin'")
|| strstr (collect_gcc_options, "'-fno-lto'")))
return LDPS_ERR;
As said, I'm trying to get the thing working with existing linkers
to be able to do any work on this. And I'm hoping on the linker
folks to come up with a design that fits my need and an implementation.
Richard.
--
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)
More information about the Gcc-patches
mailing list