This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/2] Fix -fno-lto (PR lto/46905)


> On Thu, Dec 16, 2010 at 2:20 PM, Andi Kleen <andi@firstfloor.org> wrote:
> > Richard Guenther <richard.guenther@gmail.com> writes:
> >
> >> On Thu, Dec 16, 2010 at 1:41 PM, Andi Kleen <andi@firstfloor.org> wrote:
> >>> From: Andi Kleen <ak@linux.intel.com>
> >>>
> >>> This fixes PR lto/46905.
> >>>
> >>> It's sometimes convenient in large Makefiles to globally enable LTO
> >>> in CFLAGS, but disable it again for specific files. The simplest
> >>> way to do that is appending -fno-lto, but that didn't work.
> >>> Add explicit code to handle this case.
> >>>
> >>> Passes bootstrap and full test on x86_64-linux. Ok?
> >>
> >> Do you really need the common.opt and opts.c hunks?
> >
> > Yes. The previous state without them didn't work.
> >
> > I also tried to do it without opts.c, but setting an 0 initialization
> > value for the -fno-lto entry, but that didn't work either.
> 
> Huh, that's strange.  Joseph, do you have any idea why?  Is it because
> of how flags get passed to collect2?
I think it is because -flto is not switch but accept string argument?

Honza
> 
> Richard.
> 
> > -Andi
> >
> > --
> > ak@linux.intel.com -- Speaking for myself only.
> >


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]