diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-21 18:55:26 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-21 18:55:26 -0400 |
| commit | eddecbb601c9ea3fab7e67d7892010fc9426d1e6 (patch) | |
| tree | 4bfa4740ae554e5c5a8468e74b39531a6153ce9f | |
| parent | 0bf8c869701039b12c3520cb1bb1689595ab108b (diff) | |
| parent | f2c23f65f63fe0dd83fc94efdfae0364c74458b8 (diff) | |
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
kbuild: Make DEBUG_SECTION_MISMATCH selectable, but not on by default
genksyms: Regenerate lexer and parser
genksyms: Track changes to enum constants
genksyms: simplify usage of find_symbol()
genksyms: Add helpers for building string lists
genksyms: Simplify printing of symbol types
genksyms: Simplify lexer
genksyms: Do not paste the bison header file to lex.c
modpost: fix trailing comma
KBuild: silence "'scripts/unifdef' is up to date."
kbuild: Add extra gcc checks
kbuild: reenable section mismatch analysis
unifdef: update to upstream version 2.5
| -rw-r--r-- | Documentation/kbuild/kbuild.txt | 5 | ||||
| -rw-r--r-- | Makefile | 7 | ||||
| -rw-r--r-- | lib/Kconfig.debug | 5 | ||||
| -rw-r--r-- | scripts/Makefile | 5 | ||||
| -rw-r--r-- | scripts/Makefile.build | 35 | ||||
| -rw-r--r-- | scripts/genksyms/Makefile | 4 | ||||
| -rw-r--r-- | scripts/genksyms/genksyms.c | 192 | ||||
| -rw-r--r-- | scripts/genksyms/genksyms.h | 7 | ||||
| -rw-r--r-- | scripts/genksyms/lex.c_shipped | 427 | ||||
| -rw-r--r-- | scripts/genksyms/lex.l | 44 | ||||
| -rw-r--r-- | scripts/genksyms/parse.c_shipped | 1071 | ||||
| -rw-r--r-- | scripts/genksyms/parse.h_shipped | 72 | ||||
| -rw-r--r-- | scripts/genksyms/parse.y | 34 | ||||
| -rw-r--r-- | scripts/mod/modpost.c | 23 | ||||
| -rw-r--r-- | scripts/unifdef.c | 247 |
15 files changed, 1237 insertions, 941 deletions
diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt index 8f63b224ab09..f1431d099fce 100644 --- a/Documentation/kbuild/kbuild.txt +++ b/Documentation/kbuild/kbuild.txt | |||
| @@ -196,3 +196,8 @@ to be included in the databases, separated by blank space. E.g.: | |||
| 196 | To get all available archs you can also specify all. E.g.: | 196 | To get all available archs you can also specify all. E.g.: |
| 197 | 197 | ||
| 198 | $ make ALLSOURCE_ARCHS=all tags | 198 | $ make ALLSOURCE_ARCHS=all tags |
| 199 | |||
| 200 | KBUILD_ENABLE_EXTRA_GCC_CHECKS | ||
| 201 | -------------------------------------------------- | ||
| 202 | If enabled over the make command line with "W=1", it turns on additional | ||
| 203 | gcc -W... options for more extensive build-time checking. | ||
| @@ -102,6 +102,10 @@ ifeq ("$(origin O)", "command line") | |||
| 102 | KBUILD_OUTPUT := $(O) | 102 | KBUILD_OUTPUT := $(O) |
| 103 | endif | 103 | endif |
| 104 | 104 | ||
| 105 | ifeq ("$(origin W)", "command line") | ||
| 106 | export KBUILD_ENABLE_EXTRA_GCC_CHECKS := 1 | ||
| 107 | endif | ||
| 108 | |||
| 105 | # 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 |
| 106 | PHONY := _all | 110 | PHONY := _all |
| 107 | _all: | 111 | _all: |
| @@ -1018,7 +1022,7 @@ hdr-dst = $(if $(KBUILD_HEADERS), dst=include/asm-$(hdr-arch), dst=include/asm) | |||
| 1018 | 1022 | ||
| 1019 | PHONY += __headers | 1023 | PHONY += __headers |
| 1020 | __headers: include/linux/version.h scripts_basic FORCE | 1024 | __headers: include/linux/version.h scripts_basic FORCE |
| 1021 | $(Q)$(MAKE) $(build)=scripts scripts/unifdef | 1025 | $(Q)$(MAKE) $(build)=scripts build_unifdef |
| 1022 | 1026 | ||
| 1023 | PHONY += headers_install_all | 1027 | PHONY += headers_install_all |
| 1024 | headers_install_all: | 1028 | headers_install_all: |
| @@ -1263,6 +1267,7 @@ help: | |||
| 1263 | @echo ' make O=dir [targets] Locate all output files in "dir", including .config' | 1267 | @echo ' make O=dir [targets] Locate all output files in "dir", including .config' |
| 1264 | @echo ' make C=1 [targets] Check all c source with $$CHECK (sparse by default)' | 1268 | @echo ' make C=1 [targets] Check all c source with $$CHECK (sparse by default)' |
| 1265 | @echo ' make C=2 [targets] Force check of all c source with $$CHECK' | 1269 | @echo ' make C=2 [targets] Force check of all c source with $$CHECK' |
| 1270 | @echo ' make W=1 [targets] Enable extra gcc checks' | ||
| 1266 | @echo '' | 1271 | @echo '' |
| 1267 | @echo 'Execute "make" or "make all" to build all targets marked with [*] ' | 1272 | @echo 'Execute "make" or "make all" to build all targets marked with [*] ' |
| 1268 | @echo 'For further info see the ./README file' | 1273 | @echo 'For further info see the ./README file' |
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 6f440d82b58d..191c5c4c89fc 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
| @@ -102,11 +102,6 @@ config HEADERS_CHECK | |||
| 102 | 102 | ||
| 103 | config DEBUG_SECTION_MISMATCH | 103 | config DEBUG_SECTION_MISMATCH |
| 104 | bool "Enable full Section mismatch analysis" | 104 | bool "Enable full Section mismatch analysis" |
| 105 | depends on UNDEFINED || (BLACKFIN) | ||
| 106 | default y | ||
| 107 | # This option is on purpose disabled for now. | ||
| 108 | # It will be enabled when we are down to a reasonable number | ||
| 109 | # of section mismatch warnings (< 10 for an allyesconfig build) | ||
| 110 | help | 105 | help |
| 111 | The section mismatch analysis checks if there are illegal | 106 | The section mismatch analysis checks if there are illegal |
| 112 | references from one section to another section. | 107 | references from one section to another section. |
diff --git a/scripts/Makefile b/scripts/Makefile index 2e088109fbd5..fcea26168bca 100644 --- a/scripts/Makefile +++ b/scripts/Makefile | |||
| @@ -18,6 +18,11 @@ always := $(hostprogs-y) $(hostprogs-m) | |||
| 18 | # The following hostprogs-y programs are only build on demand | 18 | # The following hostprogs-y programs are only build on demand |
| 19 | hostprogs-y += unifdef | 19 | hostprogs-y += unifdef |
| 20 | 20 | ||
| 21 | # This target is used internally to avoid "is up to date" messages | ||
| 22 | PHONY += build_unifdef | ||
| 23 | build_unifdef: scripts/unifdef FORCE | ||
| 24 | @: | ||
| 25 | |||
| 21 | subdir-$(CONFIG_MODVERSIONS) += genksyms | 26 | subdir-$(CONFIG_MODVERSIONS) += genksyms |
| 22 | subdir-y += mod | 27 | subdir-y += mod |
| 23 | subdir-$(CONFIG_SECURITY_SELINUX) += selinux | 28 | subdir-$(CONFIG_SECURITY_SELINUX) += selinux |
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 | ||
diff --git a/scripts/genksyms/Makefile b/scripts/genksyms/Makefile index e420fe440019..13d03cf05d95 100644 --- a/scripts/genksyms/Makefile +++ b/scripts/genksyms/Makefile | |||
| @@ -28,9 +28,9 @@ $(obj)/keywords.c: $(obj)/keywords.gperf FORCE | |||
| 28 | # flex | 28 | # flex |
| 29 | 29 | ||
| 30 | quiet_cmd_lex.c = FLEX $@ | 30 | quiet_cmd_lex.c = FLEX $@ |
| 31 | cmd_lex.c = flex -o$@ -d $< $(obj)/parse.h | 31 | cmd_lex.c = flex -o$@ -d $< |
| 32 | 32 | ||
| 33 | $(obj)/lex.c: $(obj)/lex.l $(obj)/parse.h $(obj)/keywords.c FORCE | 33 | $(obj)/lex.c: $(obj)/lex.l $(obj)/keywords.c FORCE |
| 34 | $(call if_changed,lex.c) | 34 | $(call if_changed,lex.c) |
| 35 | cp $@ $@_shipped | 35 | cp $@ $@_shipped |
| 36 | 36 | ||
diff --git a/scripts/genksyms/genksyms.c b/scripts/genksyms/genksyms.c index f99115ebe925..f9e75531ea03 100644 --- a/scripts/genksyms/genksyms.c +++ b/scripts/genksyms/genksyms.c | |||
| @@ -53,12 +53,22 @@ static int nsyms; | |||
| 53 | static struct symbol *expansion_trail; | 53 | static struct symbol *expansion_trail; |
| 54 | static struct symbol *visited_symbols; | 54 | static struct symbol *visited_symbols; |
| 55 | 55 | ||
| 56 | static const char *const symbol_type_name[] = { | 56 | static const struct { |
| 57 | "normal", "typedef", "enum", "struct", "union" | 57 | int n; |
| 58 | const char *name; | ||
| 59 | } symbol_types[] = { | ||
| 60 | [SYM_NORMAL] = { 0, NULL}, | ||
| 61 | [SYM_TYPEDEF] = {'t', "typedef"}, | ||
| 62 | [SYM_ENUM] = {'e', "enum"}, | ||
| 63 | [SYM_STRUCT] = {'s', "struct"}, | ||
| 64 | [SYM_UNION] = {'u', "union"}, | ||
| 65 | [SYM_ENUM_CONST] = {'E', "enum constant"}, | ||
| 58 | }; | 66 | }; |
| 59 | |||
