]> git.baikalelectronics.ru Git - kernel.git/commit
kbuild: support W=e to make build abort in case of warning
authorYann Droneaud <ydroneaud@opteya.com>
Fri, 8 Apr 2022 08:46:07 +0000 (10:46 +0200)
committerMasahiro Yamada <masahiroy@kernel.org>
Sat, 7 May 2022 18:16:59 +0000 (03:16 +0900)
commitf18957c648cbe12f8c11a11b1eca004f318cc068
treed6d32c03811d2f6375ff112491e0c6a1f2812534
parent9103af7de89342b04c1acf79c1b0b29f11433753
kbuild: support W=e to make build abort in case of warning

When developing new code/feature, CONFIG_WERROR is most
often turned off, especially for people using make W=12 to
get more warnings.

In such case, turning on -Werror temporarily would require
switching on CONFIG_WERROR in the configuration, building,
then switching off CONFIG_WERROR.

For this use case, this patch introduces a new 'e' modifier
to W= as a short hand for KCFLAGS+=-Werror" so that -Werror
got added to the kernel (built-in) and modules' CFLAGS.

Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Makefile
scripts/Makefile.extrawarn