From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8818 invoked by alias); 20 Jun 2013 03:32:09 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 8255 invoked by uid 48); 20 Jun 2013 03:32:02 -0000 From: "carlos at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/15648] Support building glibc with -flto. Date: Thu, 20 Jun 2013 03:32:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: carlos at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status short_desc bug_severity Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-06/txt/msg00155.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=15648 Carlos O'Donell changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |NEW Summary|multiple definition of |Support building glibc with |`__lll_lock_wait_private' |-flto. Severity|normal |enhancement --- Comment #4 from Carlos O'Donell --- This doesn't work at all for me for entirely different reasons. I expect that you haven't actually tried to use -flto. glibc master is currently unbuildable with -flto because of: http://sourceware.org/bugzilla/show_bug.cgi?id=15648 You should always see: checking for .preinit_array/.init_array/.fini_array support... no configure: error: Need linker with .init_array/.fini_array support. This is because -flto throws out the .init_array support. A potential fix is: diff --git a/configure.in b/configure.in index 8b11081..415e777 100644 --- a/configure.in +++ b/configure.in @@ -1383,7 +1383,7 @@ AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support, libc_cv_initfini_array, [dnl LIBC_TRY_LINK_STATIC([ int foo (void) { return 1; } -int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; +int (*fp) (void) __attribute__ ((section (".init_array"), used)) = foo; ], [if $READELF -S conftest | fgrep INIT_ARRAY > /dev/null; then libc_cv_initfini_array=yes ~~~ However, given that nobody has built with -flto it's going to require considerable work to make it happen. I'm retitling and marking as enhancement. -- You are receiving this mail because: You are on the CC list for the bug.