diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.build | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 4eb99ab34053..d5f925abe4d2 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build | |||
@@ -49,6 +49,40 @@ ifeq ($(KBUILD_NOPEDANTIC),) | |||
49 | $(error CFLAGS was changed in "$(kbuild-file)". Fix it to use EXTRA_CFLAGS) | 49 | $(error CFLAGS was changed in "$(kbuild-file)". Fix it to use EXTRA_CFLAGS) |
50 | endif | 50 | endif |
51 | endif | 51 | endif |
52 | |||
53 | # | ||
54 | # make W=1 settings | ||
55 | # | ||
56 | # $(call cc-option... ) handles gcc -W.. options which | ||
57 | # are not supported by all versions of the compiler | ||
58 | ifdef KBUILD_ENABLE_EXTRA_GCC_CHECKS | ||
59 | KBUILD_EXTRA_WARNINGS := -Wextra | ||
60 | KBUILD_EXTRA_WARNINGS += -Wunused -Wno-unused-parameter | ||
61 | KBUILD_EXTRA_WARNINGS += -Waggregate-return | ||
62 | KBUILD_EXTRA_WARNINGS += -Wbad-function-cast | ||
63 | KBUILD_EXTRA_WARNINGS += -Wcast-qual | ||
64 | KBUILD_EXTRA_WARNINGS += -Wcast-align | ||
65 | KBUILD_EXTRA_WARNINGS += -Wconversion | ||
66 | KBUILD_EXTRA_WARNINGS += -Wdisabled-optimization | ||
67 | KBUILD_EXTRA_WARNINGS += -Wlogical-op | ||
68 | KBUILD_EXTRA_WARNINGS += -Wmissing-declarations | ||
69 | KBUILD_EXTRA_WARNINGS += -Wmissing-format-attribute | ||
70 | KBUILD_EXTRA_WARNINGS += $(call cc-option, -Wmissing-include-dirs,) | ||
71 | KBUILD_EXTRA_WARNINGS += -Wmissing-prototypes | ||
72 | KBUILD_EXTRA_WARNINGS += -Wnested-externs | ||
73 | KBUILD_EXTRA_WARNINGS += -Wold-style-definition | ||
74 | KBUILD_EXTRA_WARNINGS += $(call cc-option, -Woverlength-strings,) | ||
75 | KBUILD_EXTRA_WARNINGS += -Wpacked | ||
76 | KBUILD_EXTRA_WARNINGS += -Wpacked-bitfield-compat | ||
77 | KBUILD_EXTRA_WARNINGS += -Wpadded | ||
78 | KBUILD_EXTRA_WARNINGS += -Wpointer-arith | ||
79 | KBUILD_EXTRA_WARNINGS += -Wredundant-decls | ||
80 | KBUILD_EXTRA_WARNINGS += -Wshadow | ||
81 | KBUILD_EXTRA_WARNINGS += -Wswitch-default | ||
82 | KBUILD_EXTRA_WARNINGS += $(call cc-option, -Wvla,) | ||
83 | KBUILD_CFLAGS += $(KBUILD_EXTRA_WARNINGS) | ||
84 | endif | ||
85 | |||
52 | include scripts/Makefile.lib | 86 | include scripts/Makefile.lib |
53 | 87 | ||
54 | ifdef host-progs | 88 | ifdef host-progs |
@@ -403,7 +437,6 @@ ifneq ($(cmd_files),) | |||
403 | include $(cmd_files) | 437 | include $(cmd_files) |
404 | endif | 438 | endif |
405 | 439 | ||
406 | |||
407 | # Declare the contents of the .PHONY variable as phony. We keep that | 440 | # Declare the contents of the .PHONY variable as phony. We keep that |
408 | # information in a variable se we can use it in if_changed and friends. | 441 | # information in a variable se we can use it in if_changed and friends. |
409 | 442 | ||