diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | scripts/Makefile.build | 8 |
2 files changed, 7 insertions, 3 deletions
@@ -1290,7 +1290,7 @@ help: | |||
1290 | @echo ' 1: warnings which may be relevant and do not occur too often' | 1290 | @echo ' 1: warnings which may be relevant and do not occur too often' |
1291 | @echo ' 2: warnings which occur quite often but may still be relevant' | 1291 | @echo ' 2: warnings which occur quite often but may still be relevant' |
1292 | @echo ' 3: more obscure warnings, can most likely be ignored' | 1292 | @echo ' 3: more obscure warnings, can most likely be ignored' |
1293 | 1293 | @echo ' Multiple levels can be combined with W=12 or W=123' | |
1294 | @echo '' | 1294 | @echo '' |
1295 | @echo 'Execute "make" or "make all" to build all targets marked with [*] ' | 1295 | @echo 'Execute "make" or "make all" to build all targets marked with [*] ' |
1296 | @echo 'For further info see the ./README file' | 1296 | @echo 'For further info see the ./README file' |
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 9fb19c0fbf8c..f133641f815a 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build | |||
@@ -60,6 +60,8 @@ endif | |||
60 | # $(call cc-option, -W...) handles gcc -W.. options which | 60 | # $(call cc-option, -W...) handles gcc -W.. options which |
61 | # are not supported by all versions of the compiler | 61 | # are not supported by all versions of the compiler |
62 | ifdef KBUILD_ENABLE_EXTRA_GCC_CHECKS | 62 | ifdef KBUILD_ENABLE_EXTRA_GCC_CHECKS |
63 | warning- := $(empty) | ||
64 | |||
63 | warning-1 := -Wextra -Wunused -Wno-unused-parameter | 65 | warning-1 := -Wextra -Wunused -Wno-unused-parameter |
64 | warning-1 += -Wmissing-declarations | 66 | warning-1 += -Wmissing-declarations |
65 | warning-1 += -Wmissing-format-attribute | 67 | warning-1 += -Wmissing-format-attribute |
@@ -86,9 +88,11 @@ warning-3 += -Wswitch-default | |||
86 | warning-3 += $(call cc-option, -Wpacked-bitfield-compat) | 88 | warning-3 += $(call cc-option, -Wpacked-bitfield-compat) |
87 | warning-3 += $(call cc-option, -Wvla) | 89 | warning-3 += $(call cc-option, -Wvla) |
88 | 90 | ||
89 | warning := $(warning-$(KBUILD_ENABLE_EXTRA_GCC_CHECKS)) | 91 | warning := $(warning-$(findstring 1, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS))) |
92 | warning += $(warning-$(findstring 2, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS))) | ||
93 | warning += $(warning-$(findstring 3, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS))) | ||
90 | 94 | ||
91 | ifeq ("$(warning)","") | 95 | ifeq ("$(strip $(warning))","") |
92 | $(error W=$(KBUILD_ENABLE_EXTRA_GCC_CHECKS) is unknown) | 96 | $(error W=$(KBUILD_ENABLE_EXTRA_GCC_CHECKS) is unknown) |
93 | endif | 97 | endif |
94 | 98 | ||