[systemd-bugs] [Bug 79606] New: Accommodate gcc-4.9.0 link-time optimization (LTO) changes
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Jun 3 13:36:57 PDT 2014
https://bugs.freedesktop.org/show_bug.cgi?id=79606
Priority: medium
Bug ID: 79606
Assignee: systemd-bugs at lists.freedesktop.org
Summary: Accommodate gcc-4.9.0 link-time optimization (LTO)
changes
QA Contact: systemd-bugs at lists.freedesktop.org
Severity: minor
Classification: Unclassified
OS: Linux (All)
Reporter: jpsinthemix at verizon.net
Hardware: x86 (IA32)
Status: NEW
Version: unspecified
Component: general
Product: systemd
Hi,
Systemd-213 fails to build (symbols not found/resolved during cgls link step)
under gcc-4.9.0 due to link-time optimization (lto) changes, in particular from
gcc-4.9.0/NEWS:
+ When using a linker plugin, compiling with the -flto option
now generates slim objects files (.o) which only contain
intermediate language representation for LTO. Use
-ffat-lto-objects to create files which contain additionally
the object code. To generate static libraries suitable for LTO
processing, use gcc-ar and gcc-ranlib; to list symbols from a
slim object file use gcc-nm. (Requires that ar, ranlib and nm
have been compiled with plugin support.)
Both -flto and -ffat-lto-objects are now needed when building and linking
against static libs w/LTO. As a quick fix, I simply added the -ffat-lto-objects
flag to configure
--- systemd-213.old/configure 2014-05-28 02:49:44.026507777 -0400
+++ systemd-213.new/configure 2014-05-31 18:58:26.079036215 -0400
@@ -14970,7 +14970,7 @@ case $CFLAGS in #(
*-O[12345\ ]*) :
for flag in \
- -flto; do
+ -flto -ffat-lto-objects; do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports flag $flag
in envvar CFLAGS" >&5
$as_echo_n "checking if $CC supports flag $flag in envvar CFLAGS... " >&6; }
-----------
--- systemd-213.old/configure.ac 2014-05-28 02:49:22.979663817 -0400
+++ systemd-213.new/configure.ac 2014-06-03 16:32:42.752442525 -0400
@@ -180,7 +180,7 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CF
--param=ssp-buffer-size=4])
AS_CASE([$CFLAGS], [*-O[[12345\ ]]*],
[CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
- -flto])],
+ -flto -ffat-lto-objects])],
[AC_MSG_RESULT([skipping -flto, optimization not enabled])])
AC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags")
-----------
thanks much for the great software,
John
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20140603/31100e7f/attachment.html>
More information about the systemd-bugs
mailing list