mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +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:
parent
afea8d3853
commit
4f47bb8c5e
@ -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])],
|
||||
|
Loading…
Reference in New Issue
Block a user