anitazha / rpms / systemd

Forked from rpms/systemd 3 years ago
Clone

Blame SOURCES/0062-build-sys-allow-lto-and-FORTIFY_SOURCE-with-O-sz.patch

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