summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-10-09 22:25:01 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-10-09 23:32:54 -0400
commit4f47bb8c5e5f234c614dc14532a9483328e61002 (patch)
tree1ccb0e58a1734a1b476b3988afcdff38775441ac /configure.ac
parentafea8d3853d0f76b3845729ff00e75d281f43a1b (diff)
build-sys: use -Wno-typedef-redefinition only for clang
Our checks for -Wno-xxx switches do not work with gcc [1]. [1] https://gcc.gnu.org/wiki/FAQ#wnowarning
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index caf1f0e54e..d04f6f464f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -183,7 +183,6 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
-Wno-unused-parameter \
-Wno-missing-field-initializers \
-Wno-unused-result \
- -Wno-typedef-redefinition \
-Werror=overflow \
-Wdate-time \
-Wnested-externs \
@@ -198,6 +197,11 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
-fstack-protector-strong \
-fPIE \
--param=ssp-buffer-size=4])
+
+AS_CASE([$CC], [*clang*],
+ [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
+ -Wno-typedef-redefinition])])
+
AS_CASE([$CFLAGS], [*-O[[12345\ ]]*],
[CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
-flto -ffat-lto-objects])],