diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-05-10 10:10:09 -0400 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-05-17 22:49:53 -0400 |
commit | a1494304346a3c15fb7a42b39e891f112844c1c7 (patch) | |
tree | 8eef54d1faddb9fa2cf6073be40daa8b848d6324 /Makefile | |
parent | 7eb8e5f073051eebbf55fa6b90ed2246c2274552 (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-- | Makefile | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -731,15 +731,15 @@ stackp-flags-$(CONFIG_STACKPROTECTOR_STRONG) := -fstack-protector-strong | |||
731 | KBUILD_CFLAGS += $(stackp-flags-y) | 731 | KBUILD_CFLAGS += $(stackp-flags-y) |
732 | 732 | ||
733 | ifdef CONFIG_CC_IS_CLANG | 733 | ifdef CONFIG_CC_IS_CLANG |
734 | KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,) | 734 | KBUILD_CPPFLAGS += -Qunused-arguments |
735 | KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier) | 735 | KBUILD_CFLAGS += -Wno-format-invalid-specifier |
736 | KBUILD_CFLAGS += $(call cc-disable-warning, gnu) | 736 | KBUILD_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 |
738 | KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare) | 738 | KBUILD_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 |
742 | KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,) | 742 | KBUILD_CFLAGS += -mno-global-merge |
743 | else | 743 | else |
744 | 744 | ||
745 | # These warnings generated too much noise in a regular build. | 745 | # These warnings generated too much noise in a regular build. |