From: Nathan Chancellor Date: Thu, 12 Jan 2023 03:05:10 +0000 (-0700) Subject: kbuild: Turn a couple more of clang's unused option warnings into errors X-Git-Tag: v6.6.17~5418^2~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=db1547c56886742283d7566c872f89cbad76a14c;p=platform%2Fkernel%2Flinux-rpi.git kbuild: Turn a couple more of clang's unused option warnings into errors Currently, these warnings are hidden with -Qunused-arguments in KBUILD_CPPFLAGS. Once that option is removed, these warnings should be turned into hard errors to make unconditionally added but unsupported flags for the current compilation mode or target obvious due to a failed build; otherwise, the warnings might just be ignored if the build log is not checked. Link: https://github.com/ClangBuiltLinux/linux/issues/1587 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Tested-by: Linux Kernel Functional Testing Tested-by: Anders Roxell Signed-off-by: Masahiro Yamada --- diff --git a/scripts/Makefile.clang b/scripts/Makefile.clang index 87285b7..70b354f 100644 --- a/scripts/Makefile.clang +++ b/scripts/Makefile.clang @@ -36,6 +36,8 @@ endif # so they can be implemented or wrapped in cc-option. CLANG_FLAGS += -Werror=unknown-warning-option CLANG_FLAGS += -Werror=ignored-optimization-argument +CLANG_FLAGS += -Werror=option-ignored +CLANG_FLAGS += -Werror=unused-command-line-argument KBUILD_CFLAGS += $(CLANG_FLAGS) KBUILD_AFLAGS += $(CLANG_FLAGS) export CLANG_FLAGS