daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
1ff636
From 21511551c7d49424a202b25ffe76cf1371dfc0c1 Mon Sep 17 00:00:00 2001
1ff636
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
1ff636
Date: Sun, 1 Mar 2015 22:46:43 -0500
1ff636
Subject: [PATCH] build-sys: allow lto and FORTIFY_SOURCE with -O[sz]
1ff636
1ff636
https://bugs.freedesktop.org/show_bug.cgi?id=89382
1ff636
(cherry picked from commit 0289f2fb2a64df53b589b771f69c43126b029590)
1ff636
---
1ff636
 configure.ac | 4 ++--
1ff636
 1 file changed, 2 insertions(+), 2 deletions(-)
1ff636
1ff636
diff --git a/configure.ac b/configure.ac
c62b8e
index 9c25c3c6fc..3201428c44 100644
1ff636
--- a/configure.ac
1ff636
+++ b/configure.ac
1ff636
@@ -208,13 +208,13 @@ AS_CASE([$CC], [*clang*],
1ff636
                -Wno-gnu-variable-sized-type-not-at-end \
1ff636
         ])])
1ff636
 
1ff636
-AS_CASE([$CFLAGS], [*-O[[12345\ ]]*],
1ff636
+AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
1ff636
         [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
1ff636
                -flto -ffat-lto-objects])],
1ff636
         [AC_MSG_RESULT([skipping -flto, optimization not enabled])])
1ff636
 AC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags")
1ff636
 
1ff636
-AS_CASE([$CFLAGS], [*-O[[12345\ ]]*],
1ff636
+AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
1ff636
         [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
1ff636
                -Wp,-D_FORTIFY_SOURCE=2])],
1ff636
         [AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])