From c77d06e70d59cbc6e3c22bf644bb0b197a5fc182 Mon Sep 17 00:00:00 2001 From: Yann Droneaud Date: Fri, 8 Apr 2022 10:46:07 +0200 Subject: 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 Signed-off-by: Masahiro Yamada --- Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index e915aacd02b0..235d68fa1470 100644 --- a/Makefile +++ b/Makefile @@ -1650,6 +1650,7 @@ help: @echo ' 1: warnings which may be relevant and do not occur too often' @echo ' 2: warnings which occur quite often but may still be relevant' @echo ' 3: more obscure warnings, can most likely be ignored' + @echo ' e: warnings are being treated as errors' @echo ' Multiple levels can be combined with W=12 or W=123' @echo '' @echo 'Execute "make" or "make all" to build all targets marked with [*] ' -- cgit