diff options
| author | Chris Metcalf <cmetcalf@tilera.com> | 2010-08-06 10:37:02 -0400 |
|---|---|---|
| committer | Chris Metcalf <cmetcalf@tilera.com> | 2010-08-06 10:37:02 -0400 |
| commit | ab11b487402f97975f3ac1eeea09c82f4431481e (patch) | |
| tree | 86337c5cbbd2b0c4bd07c0847a1dc7de3d898147 /scripts | |
| parent | 1c689cbcf2c2b7a35cd237abddd9206bb1b6fee1 (diff) | |
| parent | fc1caf6eafb30ea185720e29f7f5eccca61ecd60 (diff) | |
Merge branch 'master' into for-linus
Diffstat (limited to 'scripts')
34 files changed, 1515 insertions, 348 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index e4deb73e9a84..a1a5cf95a68d 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build | |||
| @@ -115,7 +115,10 @@ endif | |||
| 115 | # --------------------------------------------------------------------------- | 115 | # --------------------------------------------------------------------------- |
| 116 | 116 | ||
| 117 | # Default is built-in, unless we know otherwise | 117 | # Default is built-in, unless we know otherwise |
| 118 | modkern_cflags = $(if $(part-of-module), $(CFLAGS_MODULE), $(CFLAGS_KERNEL)) | 118 | modkern_cflags = \ |
| 119 | $(if $(part-of-module), \ | ||
| 120 | $(KBUILD_CFLAGS_MODULE) $(CFLAGS_MODULE), \ | ||
| 121 | $(KBUILD_CFLAGS_KERNEL) $(CFLAGS_KERNEL)) | ||
| 119 | quiet_modtag := $(empty) $(empty) | 122 | quiet_modtag := $(empty) $(empty) |
| 120 | 123 | ||
| 121 | $(real-objs-m) : part-of-module := y | 124 | $(real-objs-m) : part-of-module := y |
| @@ -156,14 +159,14 @@ $(obj)/%.i: $(src)/%.c FORCE | |||
| 156 | 159 | ||
| 157 | cmd_gensymtypes = \ | 160 | cmd_gensymtypes = \ |
| 158 | $(CPP) -D__GENKSYMS__ $(c_flags) $< | \ | 161 | $(CPP) -D__GENKSYMS__ $(c_flags) $< | \ |
| 159 | $(GENKSYMS) -T $@ -a $(ARCH) \ | 162 | $(GENKSYMS) $(if $(1), -T $(2)) -a $(ARCH) \ |
| 160 | $(if $(KBUILD_PRESERVE),-p) \ | 163 | $(if $(KBUILD_PRESERVE),-p) \ |
| 161 | $(if $(1),-r $(firstword $(wildcard $(@:.symtypes=.symref) /dev/null))) | 164 | -r $(firstword $(wildcard $(2:.symtypes=.symref) /dev/null)) |
| 162 | 165 | ||
| 163 | quiet_cmd_cc_symtypes_c = SYM $(quiet_modtag) $@ | 166 | quiet_cmd_cc_symtypes_c = SYM $(quiet_modtag) $@ |
| 164 | cmd_cc_symtypes_c = \ | 167 | cmd_cc_symtypes_c = \ |
| 165 | set -e; \ | 168 | set -e; \ |
| 166 | $(call cmd_gensymtypes, true) >/dev/null; \ | 169 | $(call cmd_gensymtypes,true,$@) >/dev/null; \ |
| 167 | test -s $@ || rm -f $@ | 170 | test -s $@ || rm -f $@ |
| 168 | 171 | ||
| 169 | $(obj)/%.symtypes : $(src)/%.c FORCE | 172 | $(obj)/%.symtypes : $(src)/%.c FORCE |
| @@ -192,16 +195,16 @@ else | |||
| 192 | # the actual value of the checksum generated by genksyms | 195 | # the actual value of the checksum generated by genksyms |
| 193 | 196 | ||
| 194 | cmd_cc_o_c = $(CC) $(c_flags) -c -o $(@D)/.tmp_$(@F) $< | 197 | cmd_cc_o_c = $(CC) $(c_flags) -c -o $(@D)/.tmp_$(@F) $< |
| 195 | cmd_modversions = \ | 198 | cmd_modversions = \ |
| 196 | if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \ | 199 | if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \ |
| 197 | $(call cmd_gensymtypes, $(KBUILD_SYMTYPES)) \ | 200 | $(call cmd_gensymtypes,$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \ |
| 198 | > $(@D)/.tmp_$(@F:.o=.ver); \ | 201 | > $(@D)/.tmp_$(@F:.o=.ver); \ |
| 199 | \ | 202 | \ |
| 200 | $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ | 203 | $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ |
| 201 | -T $(@D)/.tmp_$(@F:.o=.ver); \ | 204 | -T $(@D)/.tmp_$(@F:.o=.ver); \ |
| 202 | rm -f $(@D)/.tmp_$(@F) $(@D)/.tmp_$(@F:.o=.ver); \ | 205 | rm -f $(@D)/.tmp_$(@F) $(@D)/.tmp_$(@F:.o=.ver); \ |
| 203 | else \ | 206 | else \ |
| 204 | mv -f $(@D)/.tmp_$(@F) $@; \ | 207 | mv -f $(@D)/.tmp_$(@F) $@; \ |
| 205 | fi; | 208 | fi; |
| 206 | endif | 209 | endif |
| 207 | 210 | ||
| @@ -248,10 +251,10 @@ $(obj)/%.lst: $(src)/%.c FORCE | |||
| 248 | # Compile assembler sources (.S) | 251 | # Compile assembler sources (.S) |
| 249 | # --------------------------------------------------------------------------- | 252 | # --------------------------------------------------------------------------- |
| 250 | 253 | ||
| 251 | modkern_aflags := $(AFLAGS_KERNEL) | 254 | modkern_aflags := $(KBUILD_AFLAGS_KERNEL) $(AFLAGS_KERNEL) |
| 252 | 255 | ||
| 253 | $(real-objs-m) : modkern_aflags := $(AFLAGS_MODULE) | 256 | $(real-objs-m) : modkern_aflags := $(KBUILD_AFLAGS_MODULE) $(AFLAGS_MODULE) |
| 254 | $(real-objs-m:.o=.s): modkern_aflags := $(AFLAGS_MODULE) | 257 | $(real-objs-m:.o=.s): modkern_aflags := $(KBUILD_AFLAGS_MODULE) $(AFLAGS_MODULE) |
| 255 | 258 | ||
| 256 | quiet_cmd_as_s_S = CPP $(quiet_modtag) $@ | 259 | quiet_cmd_as_s_S = CPP $(quiet_modtag) $@ |
| 257 | cmd_as_s_S = $(CPP) $(a_flags) -o $@ $< | 260 | cmd_as_s_S = $(CPP) $(a_flags) -o $@ $< |
diff --git a/scripts/Makefile.help b/scripts/Makefile.help new file mode 100644 index 000000000000..d03608f5db04 --- /dev/null +++ b/scripts/Makefile.help | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | |||
| 2 | checker-help: | ||
| 3 | @echo ' coccicheck - Check with Coccinelle.' | ||
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index 8f14c81abbc7..7d22056582c1 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | # - See include/linux/module.h for more details | 30 | # - See include/linux/module.h for more details |
| 31 | 31 | ||
| 32 | # Step 4 is solely used to allow module versioning in external modules, | 32 | # Step 4 is solely used to allow module versioning in external modules, |
| 33 | # where the CRC of each module is retrieved from the Module.symers file. | 33 | # where the CRC of each module is retrieved from the Module.symvers file. |
| 34 | 34 | ||
| 35 | # KBUILD_MODPOST_WARN can be set to avoid error out in case of undefined | 35 | # KBUILD_MODPOST_WARN can be set to avoid error out in case of undefined |
| 36 | # symbols in the final module linking stage | 36 | # symbols in the final module linking stage |
| @@ -107,7 +107,7 @@ $(modules:.ko=.mod.c): __modpost ; | |||
| 107 | modname = $(notdir $(@:.mod.o=)) | 107 | modname = $(notdir $(@:.mod.o=)) |
| 108 | 108 | ||
| 109 | quiet_cmd_cc_o_c = CC $@ | 109 | quiet_cmd_cc_o_c = CC $@ |
| 110 | cmd_cc_o_c = $(CC) $(c_flags) $(CFLAGS_MODULE) \ | 110 | cmd_cc_o_c = $(CC) $(c_flags) $(KBUILD_CFLAGS_MODULE) $(CFLAGS_MODULE) \ |
| 111 | -c -o $@ $< | 111 | -c -o $@ $< |
| 112 | 112 | ||
| 113 | $(modules:.ko=.mod.o): %.mod.o: %.mod.c FORCE | 113 | $(modules:.ko=.mod.o): %.mod.o: %.mod.c FORCE |
| @@ -117,8 +117,9 @@ targets += $(modules:.ko=.mod.o) | |||
| 117 | 117 | ||
| 118 | # Step 6), final link of the modules | 118 | # Step 6), final link of the modules |
| 119 | quiet_cmd_ld_ko_o = LD [M] $@ | 119 | quiet_cmd_ld_ko_o = LD [M] $@ |
| 120 | cmd_ld_ko_o = $(LD) -r $(LDFLAGS) $(LDFLAGS_MODULE) -o $@ \ | 120 | cmd_ld_ko_o = $(LD) -r $(LDFLAGS) \ |
| 121 | $(filter-out FORCE,$^) | 121 | $(KBUILD_LDFLAGS_MODULE) $(LDFLAGS_MODULE) \ |
| 122 | -o $@ $(filter-out FORCE,$^) | ||
| 122 | 123 | ||
| 123 | $(modules): %.ko :%.o %.mod.o FORCE | 124 | $(modules): %.ko :%.o %.mod.o FORCE |
| 124 | $(call if_changed,ld_ko_o) | 125 | $(call if_changed,ld_ko_o) |
diff --git a/scripts/checkkconfigsymbols.sh b/scripts/checkkconfigsymbols.sh index 46be3c5a62b7..2ca49bb31efc 100755 --- a/scripts/checkkconfigsymbols.sh +++ b/scripts/checkkconfigsymbols.sh | |||
| @@ -14,7 +14,7 @@ find $paths -name '*.[chS]' -o -name 'Makefile' -o -name 'Makefile*[^~]'| while | |||
| 14 | do | 14 | do |
| 15 | # Output the bare Kconfig variable and the filename; the _MODULE part at | 15 | # Output the bare Kconfig variable and the filename; the _MODULE part at |
| 16 | # the end is not removed here (would need perl an not-hungry regexp for that). | 16 | # the end is not removed here (would need perl an not-hungry regexp for that). |
| 17 | sed -ne 's!^.*\<\(UML_\)\?CONFIG_\([0-9A-Z_]\+\).*!\2 '$i'!p' < $i | 17 | sed -ne 's!^.*\<\(UML_\)\?CONFIG_\([0-9A-Za-z_]\+\).*!\2 '$i'!p' < $i |
| 18 | done | \ | ||
