[Bug lto/63603] [4.9/5 Regression] Linking with -fno-lto still invokes LTO

rguenther at suse dot de gcc-bugzilla@gcc.gnu.org
Wed Oct 22 08:48:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63603

--- Comment #6 from rguenther at suse dot de <rguenther at suse dot de> ---
On Wed, 22 Oct 2014, burnus at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63603
> 
> --- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> ---
> (In reply to rguenther@suse.de from comment #4)
> > That means that
> > /* We pass any -flto flags on to the linker, which is expected
> >    to understand them.  In practice, this means it had better be collect2.  
> 
> > #define LINK_COMMAND_SPEC "\
> 
> >    "%{flto|flto=*:%<fcompare-debug*} \
> >     %{flto} %{flto=*} %l " LINK_PIE_SPEC \
> > doesn't pass on -fno-lto as expected.  Does adding %{fno-lto} after
> > %{flto} work?
> 
> That seems to do the trick: I no longer see lto1 with -fno-lto (independent of
> -f(no-)use-linker-plugin) - and, unsurprisingly, without -fno-lto it still
> invokes lto1.

Great.  Patch pre-approved for trunk and 4.9 branch.

Thanks,
Richard.



More information about the Gcc-bugs mailing list