gssproxy/Clean-up-build-flags.patch

46 lines
1.7 KiB
Diff

From 5edd13736430e5df71c728a15da5d469bfcb931d Mon Sep 17 00:00:00 2001
From: Robbie Harwood <rharwood@redhat.com>
Date: Mon, 20 Feb 2017 22:21:55 -0500
Subject: [PATCH] Clean up build flags
Don't pretend to support non-gcc-like compilers, and don't require
-Wdate-time on all builds.
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
Reviewed-by: Simo Sorce <simo@redhat.com>
(cherry picked from commit db9b56f54dfb4920b01b6a32ae6e221d231e54ce)
---
proxy/Makefile.am | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/proxy/Makefile.am b/proxy/Makefile.am
index 644694f..e1fbac1 100644
--- a/proxy/Makefile.am
+++ b/proxy/Makefile.am
@@ -40,19 +40,13 @@ AM_LDFLAGS =
if WANT_AUX_INFO
AM_CFLAGS += -aux-info $@.X
endif
-if HAVE_GCC
-# -fstrict-aliasing is needed so that -W*strict-aliasing works
-# properly
- AM_CFLAGS += -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith \
- -Wcast-qual -Wcast-align -Wwrite-strings \
- -fstrict-aliasing -Wstrict-aliasing -Werror=strict-aliasing \
- -Werror-implicit-function-declaration \
- -Werror=format-security
-
- AM_CPPFLAGS += -Wdate-time
-endif
+AM_CFLAGS += -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith \
+ -Wcast-qual -Wcast-align -Wwrite-strings \
+ -fstrict-aliasing -Wstrict-aliasing -Werror=strict-aliasing \
+ -Werror-implicit-function-declaration \
+ -Werror=format-security
if BUILD_HARDENING
- AM_CPPFLAGS += -D_FORTIFY_SOURCE=2
+ AM_CPPFLAGS += -D_FORTIFY_SOURCE=2 -Wdate-time
AM_CFLAGS += -fPIE -fstack-protector-strong
AM_LDFLAGS += -fPIE -pie -fPIC -Wl,-z,relro -Wl,-z,now
endif