[systemd-commits] configure.ac

Kay Sievers kay at kemper.freedesktop.org
Thu Nov 21 12:58:42 PST 2013


 configure.ac |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit b850b06e1efcc7e27cfd785759a3a913ac9ed196
Author: Kay Sievers <kay at vrfy.org>
Date:   Thu Nov 21 21:56:18 2013 +0100

    build-sys: enable gcc Link Time Optimization when optimization is enabled

diff --git a/configure.ac b/configure.ac
index 7794541..c0656f4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -156,6 +156,10 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
         -fdata-sections \
         -fstack-protector \
         --param=ssp-buffer-size=4])
+AS_CASE([$CFLAGS], [*-O[[12345\ ]]*],
+        [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
+               -flto])],
+        [AC_MSG_RESULT([skipping -flto, optimization not enabled])])
 AC_SUBST([OUR_CFLAGS], "$with_cflags $address_sanitizer_cflags")
 
 AS_CASE([$CFLAGS], [*-O[[12345\ ]]*],



More information about the systemd-commits mailing list