diff options
| author | Peter Zijlstra <peterz@infradead.org> | 2022-09-29 12:20:50 +0200 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2022-09-29 12:20:50 +0200 |
| commit | a1ebcd59430236b336428bbf8e1da16fb87d56e4 (patch) | |
| tree | 126b999f1eae9b7ecf1045eec425a6dbcdcb4351 /scripts/Makefile.extrawarn | |
| parent | cce6a2d7e0e494c453ad73e1e78bd50684f20cca (diff) | |
| parent | f76349cf41451c5c42a99f18a9163377e4b364ff (diff) | |
Merge branch 'v6.0-rc7'
Merge upstream to get RAPTORLAKE_S
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'scripts/Makefile.extrawarn')
| -rw-r--r-- | scripts/Makefile.extrawarn | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn index 0621c39a3955..6ae482158bc4 100644 --- a/scripts/Makefile.extrawarn +++ b/scripts/Makefile.extrawarn @@ -47,7 +47,19 @@ 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) +# Disable -Wformat KBUILD_CFLAGS += -Wno-format +# Then re-enable flags that were part of the -Wformat group that aren't +# problematic. +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) +KBUILD_CFLAGS += -Wformat-insufficient-args +endif +endif KBUILD_CFLAGS += -Wno-sign-compare KBUILD_CFLAGS += $(call cc-disable-warning, pointer-to-enum-cast) KBUILD_CFLAGS += -Wno-tautological-constant-out-of-range-compare |
