mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
kbuild: add all Clang-specific flags unconditionally
We do not support old Clang versions. Upgrade your clang version if any of these flags is unsupported. Let's add all flags inside ifdef CONFIG_CC_IS_CLANG unconditionally. Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Sedat Dilek <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Tested-by: Nick Desaulniers <[email protected]>
This commit is contained in:
parent
7eb8e5f073
commit
a149430434
2 changed files with 11 additions and 11 deletions
10
Makefile
10
Makefile
|
|
@ -731,15 +731,15 @@ stackp-flags-$(CONFIG_STACKPROTECTOR_STRONG) := -fstack-protector-strong
|
|||
KBUILD_CFLAGS += $(stackp-flags-y)
|
||||
|
||||
ifdef CONFIG_CC_IS_CLANG
|
||||
KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, gnu)
|
||||
KBUILD_CPPFLAGS += -Qunused-arguments
|
||||
KBUILD_CFLAGS += -Wno-format-invalid-specifier
|
||||
KBUILD_CFLAGS += -Wno-gnu
|
||||
# Quiet clang warning: comparison of unsigned expression < 0 is always false
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare)
|
||||
KBUILD_CFLAGS += -Wno-tautological-compare
|
||||
# CLANG uses a _MergedGlobals as optimization, but this breaks modpost, as the
|
||||
# source of a reference will be _MergedGlobals and not on of the whitelisted names.
|
||||
# See modpost pattern 2
|
||||
KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,)
|
||||
KBUILD_CFLAGS += -mno-global-merge
|
||||
else
|
||||
|
||||
# These warnings generated too much noise in a regular build.
|
||||
|
|
|
|||
Loading…
Reference in a new issue