summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-05-10 10:10:09 -0400
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-05-17 22:49:53 -0400
commita1494304346a3c15fb7a42b39e891f112844c1c7 (patch)
tree8eef54d1faddb9fa2cf6073be40daa8b848d6324 /Makefile
parent7eb8e5f073051eebbf55fa6b90ed2246c2274552 (diff)
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 <yamada.masahiro@socionext.com> Reviewed-by: Sedat Dilek <sedat.dilek@gmail.com> Reviewed-by: Nathan Chancellor <natechancellor@gmail.com> Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 5 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 8519a6c66702..48de3d02ad07 100644
--- a/Makefile
+++ b/Makefile
@@ -731,15 +731,15 @@ stackp-flags-$(CONFIG_STACKPROTECTOR_STRONG) := -fstack-protector-strong
731KBUILD_CFLAGS += $(stackp-flags-y) 731KBUILD_CFLAGS += $(stackp-flags-y)
732 732
733ifdef CONFIG_CC_IS_CLANG 733ifdef CONFIG_CC_IS_CLANG
734KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,) 734KBUILD_CPPFLAGS += -Qunused-arguments
735KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier) 735KBUILD_CFLAGS += -Wno-format-invalid-specifier
736KBUILD_CFLAGS += $(call cc-disable-warning, gnu) 736KBUILD_CFLAGS += -Wno-gnu
737# Quiet clang warning: comparison of unsigned expression < 0 is always false 737# Quiet clang warning: comparison of unsigned expression < 0 is always false
738KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare) 738KBUILD_CFLAGS += -Wno-tautological-compare
739# CLANG uses a _MergedGlobals as optimization, but this breaks modpost, as the 739# CLANG uses a _MergedGlobals as optimization, but this breaks modpost, as the
740# source of a reference will be _MergedGlobals and not on of the whitelisted names. 740# source of a reference will be _MergedGlobals and not on of the whitelisted names.
741# See modpost pattern 2 741# See modpost pattern 2
742KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,) 742KBUILD_CFLAGS += -mno-global-merge
743else 743else
744 744
745# These warnings generated too much noise in a regular build. 745# These warnings generated too much noise in a regular build.