1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00

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
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2014-10-09 22:25:01 -05:00
parent afea8d3853
commit 4f47bb8c5e

View File

@ -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])],