aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.extrawarn
diff options
context:
space:
mode:
authorNick Desaulniers <ndesaulniers@google.com>2022-09-19 10:08:28 -0700
committerMasahiro Yamada <masahiroy@kernel.org>2022-09-29 04:40:16 +0900
commit88b61e3bff93f99712718db785b4aa0c1165f35c (patch)
tree6a77ccf3bfdbe1f146c02a77dcdbcaf1463c1f40 /scripts/Makefile.extrawarn
parentkbuild: rpm-pkg: fix breakage when V=1 is used (diff)
downloadlinux-dev-88b61e3bff93f99712718db785b4aa0c1165f35c.tar.xz
linux-dev-88b61e3bff93f99712718db785b4aa0c1165f35c.zip
Makefile.compiler: replace cc-ifversion with compiler-specific macros
cc-ifversion is GCC specific. Replace it with compiler specific variants. Update the users of cc-ifversion to use these new macros. Link: https://github.com/ClangBuiltLinux/linux/issues/350 Link: https://lore.kernel.org/llvm/CAGG=3QWSAUakO42kubrCap8fp-gm1ERJJAYXTnP1iHk_wrH=BQ@mail.gmail.com/ Suggested-by: Bill Wendling <morbo@google.com> Reviewed-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/Makefile.extrawarn')
-rw-r--r--scripts/Makefile.extrawarn4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 6ae482158bc4..5769c1939d40 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -48,7 +48,7 @@ else
ifdef CONFIG_CC_IS_CLANG
KBUILD_CFLAGS += -Wno-initializer-overrides
# Clang before clang-16 would warn on default argument promotions.
-ifeq ($(shell [ $(CONFIG_CLANG_VERSION) -lt 160000 ] && echo y),y)
+ifneq ($(call clang-min-version, 160000),y)
# Disable -Wformat
KBUILD_CFLAGS += -Wno-format
# Then re-enable flags that were part of the -Wformat group that aren't
@@ -56,7 +56,7 @@ KBUILD_CFLAGS += -Wno-format
KBUILD_CFLAGS += -Wformat-extra-args -Wformat-invalid-specifier
KBUILD_CFLAGS += -Wformat-zero-length -Wnonnull
# Requires clang-12+.
-ifeq ($(shell [ $(CONFIG_CLANG_VERSION) -ge 120000 ] && echo y),y)
+ifeq ($(call clang-min-version, 120000),y)
KBUILD_CFLAGS += -Wformat-insufficient-args
endif
endif