public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] Makefile.extrawarn: Turn off -Werror when extra warnings are enabled
@ 2022-03-25 13:13 Andy Shevchenko
  2022-03-25 14:34 ` Masahiro Yamada
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Andy Shevchenko @ 2022-03-25 13:13 UTC (permalink / raw)
  To: Andy Shevchenko, linux-kbuild, linux-kernel
  Cc: Masahiro Yamada, Michal Marek, Nick Desaulniers, Borislav Petkov,
	Ingo Molnar, Linus Torvalds, Peter Zijlstra

When `make W=1 ...` is executed the level 1 warnings become errors,
due to recent change in some of the defconfigs, and fail the build.
Since there are a lot of warnings on the level 1 are still present
in the defconfigs at least for x86, let disable -Werror in such case.

Fixes: b9080ba4a6ec ("x86/defconfig: Enable WERROR")
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 scripts/Makefile.extrawarn | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 650d0b8ceec3..c81d74ef6c90 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -94,3 +94,10 @@ KBUILD_CFLAGS += $(call cc-option, -Wpacked-bitfield-compat)
 KBUILD_CPPFLAGS += -DKBUILD_EXTRA_WARN3
 
 endif
+
+#
+# Turn off -Werror when extra warnings are enabled
+#
+ifneq ($(KBUILD_EXTRA_WARN),)
+	KBUILD_CFLAGS += -Wno-error
+endif
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-03-25 20:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-25 13:13 [PATCH v1 1/1] Makefile.extrawarn: Turn off -Werror when extra warnings are enabled Andy Shevchenko
2022-03-25 14:34 ` Masahiro Yamada
2022-03-25 14:53   ` Andy Shevchenko
2022-03-25 17:20   ` Linus Torvalds
2022-03-25 17:18 ` Linus Torvalds
2022-03-25 17:51   ` Andy Shevchenko
2022-03-25 20:01 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox