<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Accommodate gcc-4.9.0 link-time optimization (LTO) changes"
href="https://bugs.freedesktop.org/show_bug.cgi?id=79606">79606</a>
</td>
</tr>
<tr>
<th>Assignee</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Summary</th>
<td>Accommodate gcc-4.9.0 link-time optimization (LTO) changes
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Severity</th>
<td>minor
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jpsinthemix@verizon.net
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86 (IA32)
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Component</th>
<td>general
</td>
</tr>
<tr>
<th>Product</th>
<td>systemd
</td>
</tr></table>
<p>
<div>
<pre>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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>