This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: [LTO Build]
Hi!
On 03/01/2012 12:51 PM, Thomas Schwinge wrote:
> Hi!
>
> On Thu, 01 Mar 2012 11:13:39 +0100, Krisztian Kocsis <krisztian.kocsis@navayo.net> wrote:
>> Does glibc support building with -flto flag?
>>
>> If I put it to the CFLAGS then configure will because the .init_array
>> check fails. I'v checked it manually and -flto really drops this section.
>>
>> Is it a compiler bug or glibc does not support LTO enabled builds?
>
> I think there haven't been any attempts yet to support this in glibc --
> as your experimenting is showing. Would you be interested in working on
> that?
>
>
> GrÃÃe,
> Thomas
Yes, I will help what I can.
It seems that it is a gcc bug:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51255
Here is a possible fix in Google's branch:
http://gcc.gnu.org/viewcvs?view=revision&revision=184493
I will try with Google's patch applied to gcc.
BR,
Krisztian Kocsis