[systemd-commits] configure.ac

Kay Sievers kay at kemper.freedesktop.org
Wed Jun 4 08:47:24 PDT 2014


 configure.ac |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 235c6e628199221b7885f159367614b7105547cf
Author: John <jpsinthemix at verizon.net>
Date:   Wed Jun 4 17:45:42 2014 +0200

    build-sys: accommodate gcc-4.9.0 link-time optimization (LTO) changes
    
    systemd 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.

diff --git a/configure.ac b/configure.ac
index 6ee4d5f..3252e65 100644
--- a/configure.ac
+++ b/configure.ac
@@ -178,7 +178,7 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
         --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")
 



More information about the systemd-commits mailing list