public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/15658] New: Support building glibc with -flto.
@ 2013-06-20 12:57 carlos at redhat dot com
2014-06-13 15:03 ` [Bug build/15658] " fweimer at redhat dot com
2024-03-15 9:31 ` sam at gentoo dot org
0 siblings, 2 replies; 3+ messages in thread
From: carlos at redhat dot com @ 2013-06-20 12:57 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=15658
Bug ID: 15658
Summary: Support building glibc with -flto.
Product: glibc
Version: 2.18
Status: NEW
Severity: enhancement
Priority: P2
Component: build
Assignee: unassigned at sourceware dot org
Reporter: carlos at redhat dot com
CC: carlos at redhat dot com
You can't build glibc with -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.
This is an enhancement.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug build/15658] Support building glibc with -flto.
2013-06-20 12:57 [Bug build/15658] New: Support building glibc with -flto carlos at redhat dot com
@ 2014-06-13 15:03 ` fweimer at redhat dot com
2024-03-15 9:31 ` sam at gentoo dot org
1 sibling, 0 replies; 3+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 15:03 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=15658
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Flags| |security-
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug build/15658] Support building glibc with -flto.
2013-06-20 12:57 [Bug build/15658] New: Support building glibc with -flto carlos at redhat dot com
2014-06-13 15:03 ` [Bug build/15658] " fweimer at redhat dot com
@ 2024-03-15 9:31 ` sam at gentoo dot org
1 sibling, 0 replies; 3+ messages in thread
From: sam at gentoo dot org @ 2024-03-15 9:31 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=15658
Sam James <sam at gentoo dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sam at gentoo dot org
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-15 9:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-20 12:57 [Bug build/15658] New: Support building glibc with -flto carlos at redhat dot com
2014-06-13 15:03 ` [Bug build/15658] " fweimer at redhat dot com
2024-03-15 9:31 ` sam at gentoo dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).