aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2011-04-27 16:15:27 -0400
committerMichal Marek <mmarek@suse.cz>2011-04-28 11:59:07 -0400
commit28bc20dccadc610c56e27255aeef2938141a0cd3 (patch)
treedfaf1a2b593a25cabffe8a83e5aaf34b3c2c166d /Makefile
parent40df759e2b9ec945f1a5ddc61b3fdfbb6583257e (diff)
kbuild: implement several W= levels
Building a kernel with "make W=1" produces far too much noise to be useful. Divide the warning options in three groups: W=1 - warnings that may be relevant and does not occur too often W=2 - warnings that occur quite often but may still be relevant W=3 - the more obscure warnings, can most likely be ignored When building the whole kernel, those levels produce: W=1 - 4859 warnings W=2 - 1394 warnings W=3 - 86666 warnings respectively. Warnings have been counted with Geert's script at http://www.kernel.org/pub/linux/kernel/people/geert/linux-log/linux-log-summary.pl Many warnings occur from .h files so fixing one file may have a nice effect on the total number of warnings. With these changes I am actually tempted to try W=1 now and then. Previously there was just too much noise. Borislav: - make the W= levels exclusive - move very noisy and making little sense for the kernel warnings to W=3 - drop -Woverlength-strings due to useless warning message - copy explanatory text for the different warning levels to 'make help' - recount warnings per level Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Borislav Petkov <bp@alien8.de> Cc: Dave Jones <davej@redhat.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index d7c42319fe1e..d43429f4ced8 100644
--- a/Makefile
+++ b/Makefile
@@ -103,7 +103,7 @@ ifeq ("$(origin O)", "command line")
103endif 103endif
104 104
105ifeq ("$(origin W)", "command line") 105ifeq ("$(origin W)", "command line")
106 export KBUILD_ENABLE_EXTRA_GCC_CHECKS := 1 106 export KBUILD_ENABLE_EXTRA_GCC_CHECKS := $(W)
107endif 107endif
108 108
109# That's our default target when none is given on the command line 109# That's our default target when none is given on the command line
@@ -1274,7 +1274,11 @@ help:
1274 @echo ' make O=dir [targets] Locate all output files in "dir", including .config' 1274 @echo ' make O=dir [targets] Locate all output files in "dir", including .config'
1275 @echo ' make C=1 [targets] Check all c source with $$CHECK (sparse by default)' 1275 @echo ' make C=1 [targets] Check all c source with $$CHECK (sparse by default)'
1276 @echo ' make C=2 [targets] Force check of all c source with $$CHECK' 1276 @echo ' make C=2 [targets] Force check of all c source with $$CHECK'
1277 @echo ' make W=1 [targets] Enable extra gcc checks' 1277 @echo ' make W=n [targets] Enable extra gcc checks, n=1,2,3 where'
1278 @echo ' 1: warnings which may be relevant and do not occur too often'
1279 @echo ' 2: warnings which occur quite often but may still be relevant'
1280 @echo ' 3: more obscure warnings, can most likely be ignored'
1281
1278 @echo '' 1282 @echo ''
1279 @echo 'Execute "make" or "make all" to build all targets marked with [*] ' 1283 @echo 'Execute "make" or "make all" to build all targets marked with [*] '
1280 @echo 'For further info see the ./README file' 1284 @echo 'For further info see the ./README file'