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