diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-13 00:23:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-13 00:23:38 -0400 |
commit | 1700ff823b27b6572cf4c3cec66d279baa1a5d30 (patch) | |
tree | 74542164e5df783004f90fa972837294729a324d | |
parent | 8841c8b3c4c4d9a9f2a6d30b463ad8d2c6e2f0ea (diff) | |
parent | 699c659b49b5c7cf601fe454683841df16495c3e (diff) |
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kbuild updates from Michal Marek:
"Kbuild changes for v3.16-rc1:
- cross-compilation fix so that cc-option is testing the right
compiler
- Fix for make defconfig all
- Using relative paths to the object and source directory where
possible, plus fixes for the fallout of the change
- several cleanups in the Makefiles and scripts
The powerpc fix is from today, because it was only discovered
recently. The rest has been in linux-next for some time"
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
powerpc: Avoid circular dependency with zImage.%
kbuild: create include/config directory in scripts/kconfig/Makefile
kbuild: do not create include/linux directory
Makefile: Fix unrecognized cross-compiler command line options
kbuild: do not add "selinux" to subdir- twice
um: Fix for relative objtree when generating x86 headers
kbuild: Use relative path when building in a subdir of the source tree
kbuild: Use relative path when building in the source tree
kbuild: Use relative path for $(objtree)
firmware: Use $(quote) in the Makefile
firmware: Simplify directory creation
kbuild: trivial - fix comment block indent
kbuild: trivial - remove trailing spaces
kbuild: support simultaneous "make %config" and "make all"
kbuild: move extra gcc checks to scripts/Makefile.extrawarn
-rw-r--r-- | Makefile | 89 | ||||
-rw-r--r-- | arch/powerpc/boot/Makefile | 4 | ||||
-rw-r--r-- | arch/um/Makefile | 3 | ||||
-rw-r--r-- | firmware/Makefile | 34 | ||||
-rw-r--r-- | scripts/Makefile | 2 | ||||
-rw-r--r-- | scripts/Makefile.build | 65 | ||||
-rw-r--r-- | scripts/Makefile.extrawarn | 67 | ||||
-rw-r--r-- | scripts/Makefile.fwinst | 26 | ||||
-rw-r--r-- | scripts/Makefile.host | 2 | ||||
-rw-r--r-- | scripts/Makefile.lib | 10 | ||||
-rw-r--r-- | scripts/conmakehash.c | 12 | ||||
-rw-r--r-- | scripts/kconfig/Makefile | 4 | ||||
-rw-r--r-- | scripts/kconfig/streamline_config.pl | 2 | ||||
-rwxr-xr-x | scripts/mkcompile_h | 4 | ||||
-rw-r--r-- | scripts/mkmakefile | 15 | ||||
-rw-r--r-- | scripts/package/builddeb | 2 | ||||
-rwxr-xr-x | scripts/patch-kernel | 4 |
17 files changed, 168 insertions, 177 deletions
@@ -105,10 +105,6 @@ ifeq ("$(origin O)", "command line") | |||
105 | KBUILD_OUTPUT := $(O) | 105 | KBUILD_OUTPUT := $(O) |
106 | endif | 106 | endif |
107 | 107 | ||
108 | ifeq ("$(origin W)", "command line") | ||
109 | export KBUILD_ENABLE_EXTRA_GCC_CHECKS := $(W) | ||
110 | endif | ||
111 | |||
112 | # That's our default target when none is given on the command line | 108 | # That's our default target when none is given on the command line |
113 | PHONY := _all | 109 | PHONY := _all |
114 | _all: | 110 | _all: |
@@ -153,8 +149,18 @@ else | |||
153 | _all: modules | 149 | _all: modules |
154 | endif | 150 | endif |
155 | 151 | ||
156 | srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR)) | 152 | ifeq ($(KBUILD_SRC),) |
157 | objtree := $(CURDIR) | 153 | # building in the source tree |
154 | srctree := . | ||
155 | else | ||
156 | ifeq ($(KBUILD_SRC)/,$(dir $(CURDIR))) | ||
157 | # building in a subdirectory of the source tree | ||
158 | srctree := .. | ||
159 | else | ||
160 | srctree := $(KBUILD_SRC) | ||
161 | endif | ||
162 | endif | ||
163 | objtree := . | ||
158 | src := $(srctree) | 164 | src := $(srctree) |
159 | obj := $(objtree) | 165 | obj := $(objtree) |
160 | 166 | ||
@@ -166,7 +172,7 @@ export srctree objtree VPATH | |||
166 | # SUBARCH tells the usermode build what the underlying arch is. That is set | 172 | # SUBARCH tells the usermode build what the underlying arch is. That is set |
167 | # first, and if a usermode build is happening, the "ARCH=um" on the command | 173 | # first, and if a usermode build is happening, the "ARCH=um" on the command |
168 | # line overrides the setting of ARCH below. If a native build is happening, | 174 | # line overrides the setting of ARCH below. If a native build is happening, |
169 | # then ARCH is assigned, getting whatever value it gets normally, and | 175 | # then ARCH is assigned, getting whatever value it gets normally, and |
170 | # SUBARCH is subsequently ignored. | 176 | # SUBARCH is subsequently ignored. |
171 | 177 | ||
172 | SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \ | 178 | SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \ |
@@ -259,18 +265,18 @@ endif | |||
259 | KBUILD_MODULES := | 265 | KBUILD_MODULES := |
260 | KBUILD_BUILTIN := 1 | 266 | KBUILD_BUILTIN := 1 |
261 | 267 | ||
262 | # If we have only "make modules", don't compile built-in objects. | 268 | # If we have only "make modules", don't compile built-in objects. |
263 | # When we're building modules with modversions, we need to consider | 269 | # When we're building modules with modversions, we need to consider |
264 | # the built-in objects during the descend as well, in order to | 270 | # the built-in objects during the descend as well, in order to |
265 | # make sure the checksums are up to date before we record them. | 271 | # make sure the checksums are up to date before we record them. |
266 | 272 | ||
267 | ifeq ($(MAKECMDGOALS),modules) | 273 | ifeq ($(MAKECMDGOALS),modules) |
268 | KBUILD_BUILTIN := $(if $(CONFIG_MODVERSIONS),1) | 274 | KBUILD_BUILTIN := $(if $(CONFIG_MODVERSIONS),1) |
269 | endif | 275 | endif |
270 | 276 | ||
271 | # If we have "make <whatever> modules", compile modules | 277 | # If we have "make <whatever> modules", compile modules |
272 | # in addition to whatever we do anyway. | 278 | # in addition to whatever we do anyway. |
273 | # Just "make" or "make all" shall build modules as well | 279 | # Just "make" or "make all" shall build modules as well |
274 | 280 | ||
275 | ifneq ($(filter all _all modules,$(MAKECMDGOALS)),) | 281 | ifneq ($(filter all _all modules,$(MAKECMDGOALS)),) |
276 | KBUILD_MODULES := 1 | 282 | KBUILD_MODULES := 1 |
@@ -294,7 +300,7 @@ export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD | |||
294 | # cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< | 300 | # cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< |
295 | # | 301 | # |
296 | # If $(quiet) is empty, the whole command will be printed. | 302 | # If $(quiet) is empty, the whole command will be printed. |
297 | # If it is set to "quiet_", only the short version will be printed. | 303 | # If it is set to "quiet_", only the short version will be printed. |
298 | # If it is set to "silent_", nothing will be printed at all, since | 304 | # If it is set to "silent_", nothing will be printed at all, since |
299 | # the variable $(silent_cmd_cc_o_c) doesn't exist. | 305 | # the variable $(silent_cmd_cc_o_c) doesn't exist. |
300 | # | 306 | # |
@@ -346,7 +352,6 @@ $(srctree)/scripts/Kbuild.include: ; | |||
346 | include $(srctree)/scripts/Kbuild.include | 352 | include $(srctree)/scripts/Kbuild.include |
347 | 353 | ||
348 | # Make variables (CC, etc...) | 354 | # Make variables (CC, etc...) |
349 | |||
350 | AS = $(CROSS_COMPILE)as | 355 | AS = $(CROSS_COMPILE)as |
351 | LD = $(CROSS_COMPILE)ld | 356 | LD = $(CROSS_COMPILE)ld |
352 | CC = $(CROSS_COMPILE)gcc | 357 | CC = $(CROSS_COMPILE)gcc |
@@ -395,8 +400,8 @@ KBUILD_CPPFLAGS := -D__KERNEL__ | |||
395 | KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ | 400 | KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ |
396 | -fno-strict-aliasing -fno-common \ | 401 | -fno-strict-aliasing -fno-common \ |
397 | -Werror-implicit-function-declaration \ | 402 | -Werror-implicit-function-declaration \ |
398 | -Wno-format-security \ | 403 | -Wno-format-security |
399 | $(call cc-option,-fno-delete-null-pointer-checks,) | 404 | |
400 | KBUILD_AFLAGS_KERNEL := | 405 | KBUILD_AFLAGS_KERNEL := |
401 | KBUILD_CFLAGS_KERNEL := | 406 | KBUILD_CFLAGS_KERNEL := |
402 | KBUILD_AFLAGS := -D__ASSEMBLY__ | 407 | KBUILD_AFLAGS := -D__ASSEMBLY__ |
@@ -504,8 +509,16 @@ ifeq ($(mixed-targets),1) | |||
504 | # We're called with mixed targets (*config and build targets). | 509 | # We're called with mixed targets (*config and build targets). |
505 | # Handle them one by one. | 510 | # Handle them one by one. |
506 | 511 | ||
507 | %:: FORCE | 512 | PHONY += $(MAKECMDGOALS) __build_one_by_one |
508 | $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= $@ | 513 | |
514 | $(filter-out __build_one_by_one, $(MAKECMDGOALS)): __build_one_by_one | ||
515 | @: | ||
516 | |||
517 | __build_one_by_one: | ||
518 | $(Q)set -e; \ | ||
519 | for i in $(MAKECMDGOALS); do \ | ||
520 | $(MAKE) -f $(srctree)/Makefile $$i; \ | ||
521 | done | ||
509 | 522 | ||
510 | else | 523 | else |
511 | ifeq ($(config-targets),1) | 524 | ifeq ($(config-targets),1) |
@@ -520,11 +533,9 @@ include $(srctree)/arch/$(SRCARCH)/Makefile | |||
520 | export KBUILD_DEFCONFIG KBUILD_KCONFIG | 533 | export KBUILD_DEFCONFIG KBUILD_KCONFIG |
521 | 534 | ||
522 | config: scripts_basic outputmakefile FORCE | 535 | config: scripts_basic outputmakefile FORCE |
523 | $(Q)mkdir -p include/linux include/config | ||
524 | $(Q)$(MAKE) $(build)=scripts/kconfig $@ | 536 | $(Q)$(MAKE) $(build)=scripts/kconfig $@ |
525 | 537 | ||
526 | %config: scripts_basic outputmakefile FORCE | 538 | %config: scripts_basic outputmakefile FORCE |
527 | $(Q)mkdir -p include/linux include/config | ||
528 | $(Q)$(MAKE) $(build)=scripts/kconfig $@ | 539 | $(Q)$(MAKE) $(build)=scripts/kconfig $@ |
529 | 540 | ||
530 | else | 541 | else |
@@ -594,14 +605,16 @@ endif # $(dot-config) | |||
594 | # Defaults to vmlinux, but the arch makefile usually adds further targets | 605 | # Defaults to vmlinux, but the arch makefile usually adds further targets |
595 | all: vmlinux | 606 | all: vmlinux |
596 | 607 | ||
608 | include $(srctree)/arch/$(SRCARCH)/Makefile | ||
609 | |||
610 | KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,) | ||
611 | |||
597 | ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE | 612 | ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE |
598 | KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,) | 613 | KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,) |
599 | else | 614 | else |
600 | KBUILD_CFLAGS += -O2 | 615 | KBUILD_CFLAGS += -O2 |
601 | endif | 616 | endif |
602 | 617 | ||
603 | include $(srctree)/arch/$(SRCARCH)/Makefile | ||
604 | |||
605 | ifdef CONFIG_READABLE_ASM | 618 | ifdef CONFIG_READABLE_ASM |
606 | # Disable optimizations that make assembler listings hard to read. | 619 | # Disable optimizations that make assembler listings hard to read. |
607 | # reorder blocks reorders the control in the function | 620 | # reorder blocks reorders the control in the function |
@@ -731,6 +744,8 @@ ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC)), y) | |||
731 | KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO | 744 | KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO |
732 | endif | 745 | endif |
733 | 746 | ||
747 | include $(srctree)/scripts/Makefile.extrawarn | ||
748 | |||
734 | # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments | 749 | # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments |
735 | KBUILD_CPPFLAGS += $(KCPPFLAGS) | 750 | KBUILD_CPPFLAGS += $(KCPPFLAGS) |
736 | KBUILD_AFLAGS += $(KAFLAGS) | 751 | KBUILD_AFLAGS += $(KAFLAGS) |
@@ -775,10 +790,10 @@ MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE) | |||
775 | export MODLIB | 790 | export MODLIB |
776 | 791 | ||
777 | # | 792 | # |
778 | # INSTALL_MOD_STRIP, if defined, will cause modules to be | 793 | # INSTALL_MOD_STRIP, if defined, will cause modules to be |
779 | # stripped after they are installed. If INSTALL_MOD_STRIP is '1', then | 794 | # stripped after they are installed. If INSTALL_MOD_STRIP is '1', then |
780 | # the default option --strip-debug will be used. Otherwise, | 795 | # the default option --strip-debug will be used. Otherwise, |
781 | # INSTALL_MOD_STRIP value will be used as the options to the strip command. | 796 | # INSTALL_MOD_STRIP value will be used as the options to the strip command. |
782 | 797 | ||
783 | ifdef INSTALL_MOD_STRIP | 798 | ifdef INSTALL_MOD_STRIP |
784 | ifeq ($(INSTALL_MOD_STRIP),1) | 799 | ifeq ($(INSTALL_MOD_STRIP),1) |
@@ -863,7 +878,7 @@ ifdef CONFIG_BUILD_DOCSRC | |||
863 | endif | 878 | endif |
864 | +$(call if_changed,link-vmlinux) | 879 | +$(call if_changed,link-vmlinux) |
865 | 880 | ||
866 | # The actual objects are generated when descending, | 881 | # The actual objects are generated when descending, |
867 | # make sure no implicit rule kicks in | 882 | # make sure no implicit rule kicks in |
868 | $(sort $(vmlinux-deps)): $(vmlinux-dirs) ; | 883 | $(sort $(vmlinux-deps)): $(vmlinux-dirs) ; |
869 | 884 | ||
@@ -1021,11 +1036,11 @@ ifdef CONFIG_MODULES | |||
1021 | 1036 | ||
1022 | all: modules | 1037 | all: modules |
1023 | 1038 | ||
1024 | # Build modules | 1039 | # Build modules |
1025 | # | 1040 | # |
1026 | # A module can be listed more than once in obj-m resulting in | 1041 | # A module can be listed more than once in obj-m resulting in |
1027 | # duplicate lines in modules.order files. Those are removed | 1042 | # duplicate lines in modules.order files. Those are removed |
1028 | # using awk while concatenating to the final file. | 1043 | # using awk while concatenating to the final file. |
1029 | 1044 | ||
1030 | PHONY += modules | 1045 | PHONY += modules |
1031 | modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin | 1046 | modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin |
@@ -1054,10 +1069,10 @@ _modinst_: | |||
1054 | @rm -rf $(MODLIB)/kernel | 1069 | @rm -rf $(MODLIB)/kernel |
1055 | @rm -f $(MODLIB)/source | 1070 | @rm -f $(MODLIB)/source |
1056 | @mkdir -p $(MODLIB)/kernel | 1071 | @mkdir -p $(MODLIB)/kernel |
1057 | @ln -s $(srctree) $(MODLIB)/source | 1072 | @ln -s `cd $(srctree) && /bin/pwd` $(MODLIB)/source |
1058 | @if [ ! $(objtree) -ef $(MODLIB)/build ]; then \ | 1073 | @if [ ! $(objtree) -ef $(MODLIB)/build ]; then \ |
1059 | rm -f $(MODLIB)/build ; \ | 1074 | rm -f $(MODLIB)/build ; \ |
1060 | ln -s $(objtree) $(MODLIB)/build ; \ | 1075 | ln -s $(CURDIR) $(MODLIB)/build ; \ |
1061 | fi | 1076 | fi |
1062 | @cp -f $(objtree)/modules.order $(MODLIB)/ | 1077 | @cp -f $(objtree)/modules.order $(MODLIB)/ |
1063 | @cp -f $(objtree)/modules.builtin $(MODLIB)/ | 1078 | @cp -f $(objtree)/modules.builtin $(MODLIB)/ |
@@ -1104,7 +1119,7 @@ CLEAN_DIRS += $(MODVERDIR) | |||
1104 | 1119 | ||
1105 | # Directories & files removed with 'make mrproper' | 1120 | # Directories & files removed with 'make mrproper' |
1106 | MRPROPER_DIRS += include/config usr/include include/generated \ | 1121 | MRPROPER_DIRS += include/config usr/include include/generated \ |
1107 | arch/*/include/generated .tmp_objdiff | 1122 | arch/*/include/generated .tmp_objdiff |
1108 | MRPROPER_FILES += .config .config.old .version .old_version $(version_h) \ | 1123 | MRPROPER_FILES += .config .config.old .version .old_version $(version_h) \ |
1109 | Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \ | 1124 | Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \ |
1110 | signing_key.priv signing_key.x509 x509.genkey \ | 1125 | signing_key.priv signing_key.x509 x509.genkey \ |
@@ -1478,7 +1493,7 @@ endif | |||
1478 | $(build)=$(build-dir) $(@:.ko=.o) | 1493 | $(build)=$(build-dir) $(@:.ko=.o) |
1479 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost | 1494 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost |
1480 | 1495 | ||
1481 | # FIXME Should go into a make.lib or something | 1496 | # FIXME Should go into a make.lib or something |
1482 | # =========================================================================== | 1497 | # =========================================================================== |
1483 | 1498 | ||
1484 | quiet_cmd_rmdirs = $(if $(wildcard $(rm-dirs)),CLEAN $(wildcard $(rm-dirs))) | 1499 | quiet_cmd_rmdirs = $(if $(wildcard $(rm-dirs)),CLEAN $(wildcard $(rm-dirs))) |
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 426dce7ae7c4..ccc25eddbcb8 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile | |||
@@ -333,8 +333,8 @@ $(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz | |||
333 | $(obj)/zImage.initrd.%: vmlinux $(wrapperbits) | 333 | $(obj)/zImage.initrd.%: vmlinux $(wrapperbits) |
334 | $(call if_changed,wrap,$*,,,$(obj)/ramdisk.image.gz) | 334 | $(call if_changed,wrap,$*,,,$(obj)/ramdisk.image.gz) |
335 | 335 | ||
336 | $(obj)/zImage.%: vmlinux $(wrapperbits) | 336 | $(addprefix $(obj)/, $(sort $(filter zImage.%, $(image-y)))): vmlinux $(wrapperbits) |
337 | $(call if_changed,wrap,$*) | 337 | $(call if_changed,wrap,$(subst $(obj)/zImage.,,$@)) |
338 | 338 | ||
339 | # dtbImage% - a dtbImage is a zImage with an embedded device tree blob | 339 | # dtbImage% - a dtbImage is a zImage with an embedded device tree blob |
340 | $(obj)/dtbImage.initrd.%: vmlinux $(wrapperbits) $(obj)/%.dtb | 340 | $(obj)/dtbImage.initrd.%: vmlinux $(wrapperbits) $(obj)/%.dtb |
diff --git a/arch/um/Makefile b/arch/um/Makefile index 36e658a4291c..e4b1a9639c4d 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile | |||
@@ -111,8 +111,7 @@ endef | |||
111 | KBUILD_KCONFIG := $(HOST_DIR)/um/Kconfig | 111 | KBUILD_KCONFIG := $(HOST_DIR)/um/Kconfig |
112 | 112 | ||
113 | archheaders: | 113 | archheaders: |
114 | $(Q)$(MAKE) -C '$(srctree)' KBUILD_SRC= \ | 114 | $(Q)$(MAKE) KBUILD_SRC= ARCH=$(HEADER_ARCH) archheaders |
115 | ARCH=$(HEADER_ARCH) O='$(objtree)' archheaders | ||
116 | 115 | ||
117 | archprepare: include/generated/user_constants.h | 116 | archprepare: include/generated/user_constants.h |
118 | 117 | ||
diff --git a/firmware/Makefile b/firmware/Makefile index cbb09ce9730a..5747417069ca 100644 --- a/firmware/Makefile +++ b/firmware/Makefile | |||
@@ -4,10 +4,10 @@ | |||
4 | 4 | ||
5 | # Create $(fwabs) from $(CONFIG_EXTRA_FIRMWARE_DIR) -- if it doesn't have a | 5 | # Create $(fwabs) from $(CONFIG_EXTRA_FIRMWARE_DIR) -- if it doesn't have a |
6 | # leading /, it's relative to $(srctree). | 6 | # leading /, it's relative to $(srctree). |
7 | fwdir := $(subst ",,$(CONFIG_EXTRA_FIRMWARE_DIR)) | 7 | fwdir := $(subst $(quote),,$(CONFIG_EXTRA_FIRMWARE_DIR)) |
8 | fwabs := $(addprefix $(srctree)/,$(filter-out /%,$(fwdir)))$(filter /%,$(fwdir)) | 8 | fwabs := $(addprefix $(srctree)/,$(filter-out /%,$(fwdir)))$(filter /%,$(fwdir)) |
9 | 9 | ||
10 | fw-external-y := $(subst ",,$(CONFIG_EXTRA_FIRMWARE)) | 10 | fw-external-y := $(subst $(quote),,$(CONFIG_EXTRA_FIRMWARE)) |
11 | 11 | ||
12 | # There are three cases to care about: | 12 | # There are three cases to care about: |
13 | # 1. Building kernel with CONFIG_FIRMWARE_IN_KERNEL=y -- $(fw-shipped-y) should | 13 | # 1. Building kernel with CONFIG_FIRMWARE_IN_KERNEL=y -- $(fw-shipped-y) should |
@@ -138,12 +138,6 @@ fw-shipped-$(CONFIG_YAM) += yam/1200.bin yam/9600.bin | |||
138 | 138 | ||
139 | fw-shipped-all := $(fw-shipped-y) $(fw-shipped-m) $(fw-shipped-) | 139 | fw-shipped-all := $(fw-shipped-y) $(fw-shipped-m) $(fw-shipped-) |
140 | 140 | ||
141 | # Directories which we _might_ need to create, so we have a rule for them. | ||
142 | firmware-dirs := $(sort $(addprefix $(objtree)/$(obj)/,$(dir $(fw-external-y) $(fw-shipped-all)))) | ||
143 | |||
144 | quiet_cmd_mkdir = MKDIR $(patsubst $(objtree)/%,%,$@) | ||
145 | cmd_mkdir = mkdir -p $@ | ||
146 | |||
147 | quiet_cmd_ihex = IHEX $@ | 141 | quiet_cmd_ihex = IHEX $@ |
148 | cmd_ihex = $(OBJCOPY) -Iihex -Obinary $< $@ | 142 | cmd_ihex = $(OBJCOPY) -Iihex -Obinary $< $@ |
149 | 143 | ||
@@ -184,21 +178,10 @@ wordsize_deps := $(wildcard include/config/64bit.h include/config/32bit.h \ | |||
184 | include/config/superh32.h include/config/superh64.h \ | 178 | include/config/superh32.h include/config/superh64.h \ |
185 | include/config/x86_32.h include/config/x86_64.h) | 179 | include/config/x86_32.h include/config/x86_64.h) |
186 | 180 | ||
187 | # Workaround for make < 3.81, where .SECONDEXPANSION doesn't work. | 181 | $(patsubst %,$(obj)/%.gen.S, $(fw-shipped-y)): %: $(wordsize_deps) |
188 | # It'll end up depending on these targets, so make them a PHONY rule which | ||
189 | # depends on _all_ the directories in $(firmware-dirs), and it'll work out OK. | ||
190 | PHONY += $(objtree)/$$(%) $(objtree)/$(obj)/$$(%) | ||
191 | $(objtree)/$$(%) $(objtree)/$(obj)/$$(%): $(firmware-dirs) | ||
192 | @true | ||
193 | |||
194 | # For the $$(dir %) trick, where we need % to be expanded first. | ||
195 | .SECONDEXPANSION: | ||
196 | |||
197 | $(patsubst %,$(obj)/%.gen.S, $(fw-shipped-y)): %: $(wordsize_deps) \ | ||
198 | | $(objtree)/$$(dir %) | ||
199 | $(call cmd,fwbin,$(patsubst %.gen.S,%,$@)) | 182 | $(call cmd,fwbin,$(patsubst %.gen.S,%,$@)) |
200 | $(patsubst %,$(obj)/%.gen.S, $(fw-external-y)): %: $(wordsize_deps) \ | 183 | $(patsubst %,$(obj)/%.gen.S, $(fw-external-y)): %: $(wordsize_deps) \ |
201 | include/config/extra/firmware/dir.h | $(objtree)/$$(dir %) | 184 | include/config/extra/firmware/dir.h |
202 | $(call cmd,fwbin,$(fwabs)/$(patsubst $(obj)/%.gen.S,%,$@)) | 185 | $(call cmd,fwbin,$(fwabs)/$(patsubst $(obj)/%.gen.S,%,$@)) |
203 | 186 | ||
204 | # The .o files depend on the binaries directly; the .S files don't. | 187 | # The .o files depend on the binaries directly; the .S files don't. |
@@ -207,7 +190,7 @@ $(patsubst %,$(obj)/%.gen.o, $(fw-external-y)): $(obj)/%.gen.o: $(fwdir)/% | |||
207 | 190 | ||
208 | # .ihex is used just as a simple way to hold binary files in a source tree | 191 | # .ihex is used just as a simple way to hold binary files in a source tree |
209 | # where binaries are frowned upon. They are directly converted with objcopy. | 192 | # where binaries are frowned upon. They are directly converted with objcopy. |
210 | $(obj)/%: $(obj)/%.ihex | $(objtree)/$(obj)/$$(dir %) | 193 | $(obj)/%: $(obj)/%.ihex |
211 | $(call cmd,ihex) | 194 | $(call cmd,ihex) |
212 | 195 | ||
213 | # Don't depend on ihex2fw if we're installing and it already exists. | 196 | # Don't depend on ihex2fw if we're installing and it already exists. |
@@ -226,16 +209,13 @@ endif | |||
226 | # is actually meaningful, because the firmware has to be loaded in a certain | 209 | # is actually meaningful, because the firmware has to be loaded in a certain |
227 | # order rather than as a single binary blob. Thus, we convert them into our | 210 | # order rather than as a single binary blob. Thus, we convert them into our |
228 | # more compact binary representation of ihex records (<linux/ihex.h>) | 211 | # more compact binary representation of ihex records (<linux/ihex.h>) |
229 | $(obj)/%.fw: $(obj)/%.HEX $(ihex2fw_dep) | $(objtree)/$(obj)/$$(dir %) | 212 | $(obj)/%.fw: $(obj)/%.HEX $(ihex2fw_dep) |
230 | $(call cmd,ihex2fw) | 213 | $(call cmd,ihex2fw) |
231 | 214 | ||
232 | # .H16 is our own modified form of Intel HEX, with 16-bit length for records. | 215 | # .H16 is our own modified form of Intel HEX, with 16-bit length for records. |
233 | $(obj)/%.fw: $(obj)/%.H16 $(ihex2fw_dep) | $(objtree)/$(obj)/$$(dir %) | 216 | $(obj)/%.fw: $(obj)/%.H16 $(ihex2fw_dep) |
234 | $(call cmd,h16tofw) | 217 | $(call cmd,h16tofw) |
235 | 218 | ||
236 | $(firmware-dirs): | ||
237 | $(call cmd,mkdir) | ||
238 | |||
239 | obj-y += $(patsubst %,%.gen.o, $(fw-external-y)) | 219 | obj-y += $(patsubst %,%.gen.o, $(fw-external-y)) |
240 | obj-$(CONFIG_FIRMWARE_IN_KERNEL) += $(patsubst %,%.gen.o, $(fw-shipped-y)) | 220 | obj-$(CONFIG_FIRMWARE_IN_KERNEL) += $(patsubst %,%.gen.o, $(fw-shipped-y)) |
241 | 221 | ||
diff --git a/scripts/Makefile b/scripts/Makefile index 1d07860f6c42..890df5c6adfb 100644 --- a/scripts/Makefile +++ b/scripts/Makefile | |||
@@ -39,4 +39,4 @@ subdir-$(CONFIG_SECURITY_SELINUX) += selinux | |||
39 | subdir-$(CONFIG_DTC) += dtc | 39 | subdir-$(CONFIG_DTC) += dtc |
40 | 40 | ||
41 | # Let clean descend into subdirs | 41 | # Let clean descend into subdirs |
42 | subdir- += basic kconfig package selinux | 42 | subdir- += basic kconfig package |
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 003bc263105a..bf3e6778cd71 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build | |||
@@ -50,67 +50,6 @@ ifeq ($(KBUILD_NOPEDANTIC),) | |||
50 | endif | 50 | endif |
51 | endif | 51 | endif |
52 | 52 | ||
53 | # | ||
54 | # make W=... settings | ||
55 | # | ||
56 | # W=1 - warnings that may be relevant and does not occur too often | ||
57 | # W=2 - warnings that occur quite often but may still be relevant | ||
58 | # W=3 - the more obscure warnings, can most likely be ignored | ||
59 | # | ||
60 | # $(call cc-option, -W...) handles gcc -W.. options which | ||
61 | # are not supported by all versions of the compiler | ||
62 | ifdef KBUILD_ENABLE_EXTRA_GCC_CHECKS | ||
63 | warning- := $(empty) | ||
64 | |||
65 | warning-1 := -Wextra -Wunused -Wno-unused-parameter | ||
66 | warning-1 += -Wmissing-declarations | ||
67 | warning-1 += -Wmissing-format-attribute | ||
68 | warning-1 += $(call cc-option, -Wmissing-prototypes) | ||
69 | warning-1 += -Wold-style-definition | ||
70 | warning-1 += $(call cc-option, -Wmissing-include-dirs) | ||
71 | warning-1 += $(call cc-option, -Wunused-but-set-variable) | ||
72 | warning-1 += $(call cc-disable-warning, missing-field-initializers) | ||
73 | |||
74 | # Clang | ||
75 | warning-1 += $(call cc-disable-warning, initializer-overrides) | ||
76 | warning-1 += $(call cc-disable-warning, unused-value) | ||
77 | warning-1 += $(call cc-disable-warning, format) | ||
78 | warning-1 += $(call cc-disable-warning, unknown-warning-option) | ||
79 | warning-1 += $(call cc-disable-warning, sign-compare) | ||
80 | warning-1 += $(call cc-disable-warning, format-zero-length) | ||
81 | warning-1 += $(call cc-disable-warning, uninitialized) | ||
82 | warning-1 += $(call cc-option, -fcatch-undefined-behavior) | ||
83 | |||
84 | warning-2 := -Waggregate-return | ||
85 | warning-2 += -Wcast-align | ||
86 | warning-2 += -Wdisabled-optimization | ||
87 | warning-2 += -Wnested-externs | ||
88 | warning-2 += -Wshadow | ||
89 | warning-2 += $(call cc-option, -Wlogical-op) | ||
90 | warning-2 += $(call cc-option, -Wmissing-field-initializers) | ||
91 | |||
92 | warning-3 := -Wbad-function-cast | ||
93 | warning-3 += -Wcast-qual | ||
94 | warning-3 += -Wconversion | ||
95 | warning-3 += -Wpacked | ||
96 | warning-3 += -Wpadded | ||
97 | warning-3 += -Wpointer-arith | ||
98 | warning-3 += -Wredundant-decls | ||
99 | warning-3 += -Wswitch-default | ||
100 | warning-3 += $(call cc-option, -Wpacked-bitfield-compat) | ||
101 | warning-3 += $(call cc-option, -Wvla) | ||
102 | |||
103 | warning := $(warning-$(findstring 1, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS))) | ||
104 | warning += $(warning-$(findstring 2, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS))) | ||
105 | warning += $(warning-$(findstring 3, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS))) | ||
106 | |||
107 | ifeq ("$(strip $(warning))","") | ||
108 | $(error W=$(KBUILD_ENABLE_EXTRA_GCC_CHECKS) is unknown) | ||
109 | endif | ||
110 | |||
111 | KBUILD_CFLAGS += $(warning) | ||
112 | endif | ||
113 | |||
114 | include scripts/Makefile.lib | 53 | include scripts/Makefile.lib |
115 | 54 | ||
116 | ifdef host-progs | 55 | ifdef host-progs |
@@ -342,7 +281,7 @@ $(real-objs-m) : modkern_aflags := $(KBUILD_AFLAGS_MODULE) $(AFLAGS_MODULE) | |||
342 | $(real-objs-m:.o=.s): modkern_aflags := $(KBUILD_AFLAGS_MODULE) $(AFLAGS_MODULE) | 281 | $(real-objs-m:.o=.s): modkern_aflags := $(KBUILD_AFLAGS_MODULE) $(AFLAGS_MODULE) |
343 | 282 | ||
344 | quiet_cmd_as_s_S = CPP $(quiet_modtag) $@ | 283 | quiet_cmd_as_s_S = CPP $(quiet_modtag) $@ |
345 | cmd_as_s_S = $(CPP) $(a_flags) -o $@ $< | 284 | cmd_as_s_S = $(CPP) $(a_flags) -o $@ $< |
346 | 285 | ||
347 | $(obj)/%.s: $(src)/%.S FORCE | 286 | $(obj)/%.s: $(src)/%.S FORCE |
348 | $(call if_changed_dep,as_s_S) | 287 | $(call if_changed_dep,as_s_S) |
@@ -436,7 +375,7 @@ link_multi_deps = \ | |||
436 | $(filter $(addprefix $(obj)/, \ | 375 | $(filter $(addprefix $(obj)/, \ |
437 | $($(subst $(obj)/,,$(@:.o=-objs))) \ | 376 | $($(subst $(obj)/,,$(@:.o=-objs))) \ |
438 | $($(subst $(obj)/,,$(@:.o=-y)))), $^) | 377 | $($(subst $(obj)/,,$(@:.o=-y)))), $^) |
439 | 378 | ||
440 | quiet_cmd_link_multi-y = LD $@ | 379 | quiet_cmd_link_multi-y = LD $@ |
441 | cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps) $(cmd_secanalysis) | 380 | cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps) $(cmd_secanalysis) |
442 | 381 | ||
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn new file mode 100644 index 000000000000..65643506c71c --- /dev/null +++ b/scripts/Makefile.extrawarn | |||
@@ -0,0 +1,67 @@ | |||
1 | # ========================================================================== | ||
2 | # | ||
3 | # make W=... settings | ||
4 | # | ||
5 | # W=1 - warnings that may be relevant and does not occur too often | ||
6 | # W=2 - warnings that occur quite often but may still be relevant | ||
7 | # W=3 - the more obscure warnings, can most likely be ignored | ||
8 | # | ||
9 | # $(call cc-option, -W...) handles gcc -W.. options which | ||
10 | # are not supported by all versions of the compiler | ||
11 | # ========================================================================== | ||
12 | |||
13 | ifeq ("$(origin W)", "command line") | ||
14 | export KBUILD_ENABLE_EXTRA_GCC_CHECKS := $(W) | ||
15 | endif | ||
16 | |||
17 | ifdef KBUILD_ENABLE_EXTRA_GCC_CHECKS | ||
18 | warning- := $(empty) | ||
19 | |||
20 | warning-1 := -Wextra -Wunused -Wno-unused-parameter | ||
21 | warning-1 += -Wmissing-declarations | ||
22 | warning-1 += -Wmissing-format-attribute | ||
23 | warning-1 += $(call cc-option, -Wmissing-prototypes) | ||
24 | warning-1 += -Wold-style-definition | ||
25 | warning-1 += $(call cc-option, -Wmissing-include-dirs) | ||
26 | warning-1 += $(call cc-option, -Wunused-but-set-variable) | ||
27 | warning-1 += $(call cc-disable-warning, missing-field-initializers) | ||
28 | |||
29 | # Clang | ||
30 | warning-1 += $(call cc-disable-warning, initializer-overrides) | ||
31 | warning-1 += $(call cc-disable-warning, unused-value) | ||
32 | warning-1 += $(call cc-disable-warning, format) | ||
33 | warning-1 += $(call cc-disable-warning, unknown-warning-option) | ||
34 | warning-1 += $(call cc-disable-warning, sign-compare) | ||
35 | warning-1 += $(call cc-disable-warning, format-zero-length) | ||
36 | warning-1 += $(call cc-disable-warning, uninitialized) | ||
37 | warning-1 += $(call cc-option, -fcatch-undefined-behavior) | ||
38 | |||
39 | warning-2 := -Waggregate-return | ||
40 | warning-2 += -Wcast-align | ||
41 | warning-2 += -Wdisabled-optimization | ||
42 | warning-2 += -Wnested-externs | ||
43 | warning-2 += -Wshadow | ||
44 | warning-2 += $(call cc-option, -Wlogical-op) | ||
45 | warning-2 += $(call cc-option, -Wmissing-field-initializers) | ||
46 | |||
47 | warning-3 := -Wbad-function-cast | ||
48 | warning-3 += -Wcast-qual | ||
49 | warning-3 += -Wconversion | ||
50 | warning-3 += -Wpacked | ||
51 | warning-3 += -Wpadded | ||
52 | warning-3 += -Wpointer-arith | ||
53 | warning-3 += -Wredundant-decls | ||
54 | warning-3 += -Wswitch-default | ||
55 | warning-3 += $(call cc-option, -Wpacked-bitfield-compat) | ||
56 | warning-3 += $(call cc-option, -Wvla) | ||
57 | |||
58 | warning := $(warning-$(findstring 1, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS))) | ||
59 | warning += $(warning-$(findstring 2, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS))) | ||
60 | warning += $(warning-$(findstring 3, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS))) | ||
61 | |||
62 | ifeq ("$(strip $(warning))","") | ||
63 | $(error W=$(KBUILD_ENABLE_EXTRA_GCC_CHECKS) is unknown) | ||
64 | endif | ||
65 | |||
66 | KBUILD_CFLAGS += $(warning) | ||
67 | endif | ||
diff --git a/scripts/Makefile.fwinst b/scripts/Makefile.fwinst index 4d908d16c035..d8e335eed226 100644 --- a/scripts/Makefile.fwinst +++ b/scripts/Makefile.fwinst | |||
@@ -18,31 +18,29 @@ include $(srctree)/$(obj)/Makefile | |||
18 | include scripts/Makefile.host | 18 | include scripts/Makefile.host |
19 | 19 | ||
20 | mod-fw := $(fw-shipped-m) | 20 | mod-fw := $(fw-shipped-m) |
21 | # If CONFIG_FIRMWARE_IN_KERNEL isn't set, then install the | 21 | # If CONFIG_FIRMWARE_IN_KERNEL isn't set, then install the |
22 | # firmware for in-kernel drivers too. | 22 | # firmware for in-kernel drivers too. |
23 | ifndef CONFIG_FIRMWARE_IN_KERNEL | 23 | ifndef CONFIG_FIRMWARE_IN_KERNEL |
24 | mod-fw += $(fw-shipped-y) | 24 | mod-fw += $(fw-shipped-y) |
25 | endif | 25 | endif |
26 | 26 | ||
27 | ifneq ($(KBUILD_SRC),) | ||
28 | # Create output directory if not already present | ||
29 | _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) | ||
30 | |||
31 | firmware-dirs := $(sort $(addprefix $(objtree)/$(obj)/,$(dir $(fw-external-y) $(fw-shipped-all)))) | ||
32 | # Create directories for firmware in subdirectories | ||
33 | _dummy := $(foreach d,$(firmware-dirs), $(shell [ -d $(d) ] || mkdir -p $(d))) | ||
34 | endif | ||
35 | |||
27 | installed-mod-fw := $(addprefix $(INSTALL_FW_PATH)/,$(mod-fw)) | 36 | installed-mod-fw := $(addprefix $(INSTALL_FW_PATH)/,$(mod-fw)) |
28 | 37 | ||
29 | installed-fw := $(addprefix $(INSTALL_FW_PATH)/,$(fw-shipped-all)) | 38 | installed-fw := $(addprefix $(INSTALL_FW_PATH)/,$(fw-shipped-all)) |
30 | installed-fw-dirs := $(sort $(dir $(installed-fw))) $(INSTALL_FW_PATH)/./ | ||
31 | |||
32 | # Workaround for make < 3.81, where .SECONDEXPANSION doesn't work. | ||
33 | PHONY += $(INSTALL_FW_PATH)/$$(%) install-all-dirs | ||
34 | $(INSTALL_FW_PATH)/$$(%): install-all-dirs | ||
35 | @true | ||
36 | install-all-dirs: $(installed-fw-dirs) | ||
37 | @true | ||
38 | 39 | ||
39 | quiet_cmd_install = INSTALL $(subst $(srctree)/,,$@) | 40 | quiet_cmd_install = INSTALL $(subst $(srctree)/,,$@) |
40 | cmd_install = $(INSTALL) -m0644 $< $@ | 41 | cmd_install = mkdir -p $(@D); $(INSTALL) -m0644 $< $@ |
41 | |||
42 | $(installed-fw-dirs): | ||
43 | $(call cmd,mkdir) | ||
44 | 42 | ||
45 | $(installed-fw): $(INSTALL_FW_PATH)/%: $(obj)/% | $(INSTALL_FW_PATH)/$$(dir %) | 43 | $(installed-fw): $(INSTALL_FW_PATH)/%: $(obj)/% |
46 | $(call cmd,install) | 44 | $(call cmd,install) |
47 | 45 | ||
48 | PHONY += __fw_install __fw_modinst FORCE | 46 | PHONY += __fw_install __fw_modinst FORCE |
diff --git a/scripts/Makefile.host b/scripts/Makefile.host index 1ac414fd5030..0f0d6ba87e42 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host | |||
@@ -166,5 +166,5 @@ $(host-cshlib): $(obj)/%: $(host-cshobjs) FORCE | |||
166 | $(call if_changed,host-cshlib) | 166 | $(call if_changed,host-cshlib) |
167 | 167 | ||
168 | targets += $(host-csingle) $(host-cmulti) $(host-cobjs)\ | 168 | targets += $(host-csingle) $(host-cmulti) $(host-cobjs)\ |
169 | $(host-cxxmulti) $(host-cxxobjs) $(host-cshlib) $(host-cshobjs) | 169 | $(host-cxxmulti) $(host-cxxobjs) $(host-cshlib) $(host-cshobjs) |
170 | 170 | ||
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 6a5b0decb797..260bf8acfce9 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib | |||
@@ -27,7 +27,7 @@ lib-y := $(filter-out $(obj-y), $(sort $(lib-y) $(lib-m))) | |||
27 | # --------------------------------------------------------------------------- | 27 | # --------------------------------------------------------------------------- |
28 | # o if we encounter foo/ in $(obj-y), replace it by foo/built-in.o | 28 | # o if we encounter foo/ in $(obj-y), replace it by foo/built-in.o |
29 | # and add the directory to the list of dirs to descend into: $(subdir-y) | 29 | # and add the directory to the list of dirs to descend into: $(subdir-y) |
30 | # o if we encounter foo/ in $(obj-m), remove it from $(obj-m) | 30 | # o if we encounter foo/ in $(obj-m), remove it from $(obj-m) |
31 | # and add the directory to the list of dirs to descend into: $(subdir-m) | 31 | # and add the directory to the list of dirs to descend into: $(subdir-m) |
32 | 32 | ||
33 | # Determine modorder. | 33 | # Determine modorder. |
@@ -46,7 +46,7 @@ obj-m := $(filter-out %/, $(obj-m)) | |||
46 | 46 | ||
47 | subdir-ym := $(sort $(subdir-y) $(subdir-m)) | 47 | subdir-ym := $(sort $(subdir-y) $(subdir-m)) |
48 | 48 | ||
49 | # if $(foo-objs) exists, foo.o is a composite object | 49 | # if $(foo-objs) exists, foo.o is a composite object |
50 | multi-used-y := $(sort $(foreach m,$(obj-y), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m)))) | 50 | multi-used-y := $(sort $(foreach m,$(obj-y), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m)))) |
51 | multi-used-m := $(sort $(foreach m,$(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m)))) | 51 | multi-used-m := $(sort $(foreach m,$(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m)))) |
52 | multi-used := $(multi-used-y) $(multi-used-m) | 52 | multi-used := $(multi-used-y) $(multi-used-m) |
@@ -91,7 +91,7 @@ obj-dirs := $(addprefix $(obj)/,$(obj-dirs)) | |||
91 | 91 | ||
92 | # These flags are needed for modversions and compiling, so we define them here | 92 | # These flags are needed for modversions and compiling, so we define them here |
93 | # already | 93 | # already |
94 | # $(modname_flags) #defines KBUILD_MODNAME as the name of the module it will | 94 | # $(modname_flags) #defines KBUILD_MODNAME as the name of the module it will |
95 | # end up in (or would, if it gets compiled in) | 95 | # end up in (or would, if it gets compiled in) |
96 | # Note: Files that end up in two or more modules are compiled without the | 96 | # Note: Files that end up in two or more modules are compiled without the |
97 | # KBUILD_MODNAME definition. The reason is that any made-up name would | 97 | # KBUILD_MODNAME definition. The reason is that any made-up name would |
@@ -212,7 +212,7 @@ $(obj)/%: $(src)/%_shipped | |||
212 | 212 | ||
213 | # Commands useful for building a boot image | 213 | # Commands useful for building a boot image |
214 | # =========================================================================== | 214 | # =========================================================================== |
215 | # | 215 | # |
216 | # Use as following: | 216 | # Use as following: |
217 | # | 217 | # |
218 | # target: source(s) FORCE | 218 | # target: source(s) FORCE |
@@ -226,7 +226,7 @@ $(obj)/%: $(src)/%_shipped | |||
226 | 226 | ||
227 | quiet_cmd_ld = LD $@ | 227 | quiet_cmd_ld = LD $@ |
228 | cmd_ld = $(LD) $(LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F)) \ | 228 | cmd_ld = $(LD) $(LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F)) \ |
229 | $(filter-out FORCE,$^) -o $@ | 229 | $(filter-out FORCE,$^) -o $@ |
230 | 230 | ||
231 | # Objcopy | 231 | # Objcopy |
232 | # --------------------------------------------------------------------------- | 232 | # --------------------------------------------------------------------------- |
diff --git a/scripts/conmakehash.c b/scripts/conmakehash.c index 263a44d57fa9..61bbda54cf13 100644 --- a/scripts/conmakehash.c +++ b/scripts/conmakehash.c | |||
@@ -104,7 +104,7 @@ int main(int argc, char *argv[]) | |||
104 | } | 104 | } |
105 | } | 105 | } |
106 | 106 | ||
107 | /* For now we assume the default font is always 256 characters. */ | 107 | /* For now we assume the default font is always 256 characters. */ |
108 | fontlen = 256; | 108 | fontlen = 256; |
109 | 109 | ||
110 | /* Initialize table */ | 110 | /* Initialize table */ |
@@ -236,15 +236,15 @@ int main(int argc, char *argv[]) | |||
236 | } | 236 | } |
237 | 237 | ||
238 | /* Okay, we hit EOF, now output hash table */ | 238 | /* Okay, we hit EOF, now output hash table */ |
239 | 239 | ||
240 | fclose(ctbl); | 240 | fclose(ctbl); |
241 | 241 | ||
242 | 242 | ||
243 | /* Compute total size of Unicode list */ | 243 | /* Compute total size of Unicode list */ |
244 | nuni = 0; | 244 | nuni = 0; |
245 | for ( i = 0 ; i < fontlen ; i++ ) | 245 | for ( i = 0 ; i < fontlen ; i++ ) |
246 | nuni += unicount[i]; | 246 | nuni += unicount[i]; |
247 | 247 | ||
248 | printf("\ | 248 | printf("\ |
249 | /*\n\ | 249 | /*\n\ |
250 | * Do not edit this file; it was automatically generated by\n\ | 250 | * Do not edit this file; it was automatically generated by\n\ |
@@ -268,9 +268,9 @@ u8 dfont_unicount[%d] = \n\ | |||
268 | else | 268 | else |
269 | printf(", "); | 269 | printf(", "); |
270 | } | 270 | } |
271 | 271 | ||
272 | printf("\nu16 dfont_unitable[%d] = \n{\n\t", nuni); | 272 | printf("\nu16 dfont_unitable[%d] = \n{\n\t", nuni); |
273 | 273 | ||
274 | fp0 = 0; | 274 | fp0 = 0; |
275 | nent = 0; | 275 | nent = 0; |
276 | for ( i = 0 ; i < nuni ; i++ ) | 276 | for ( i = 0 ; i < nuni ; i++ ) |
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 844bc9da08da..573ff3f1f533 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
@@ -33,11 +33,11 @@ oldconfig: $(obj)/conf | |||
33 | $< --$@ $(Kconfig) | 33 | $< --$@ $(Kconfig) |
34 | 34 | ||
35 | silentoldconfig: $(obj)/conf | 35 | silentoldconfig: $(obj)/conf |
36 | $(Q)mkdir -p include/generated | 36 | $(Q)mkdir -p include/config include/generated |
37 | $< --$@ $(Kconfig) | 37 | $< --$@ $(Kconfig) |
38 | 38 | ||
39 | localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf | 39 | localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf |
40 | $(Q)mkdir -p include/generated | 40 | $(Q)mkdir -p include/config include/generated |
41 | $(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config | 41 | $(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config |
42 | $(Q)if [ -f .config ]; then \ | 42 | $(Q)if [ -f .config ]; then \ |
43 | cmp -s .tmp.config .config || \ | 43 | cmp -s .tmp.config .config || \ |
diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl index 31331723e810..9cb8522d8d22 100644 --- a/scripts/kconfig/streamline_config.pl +++ b/scripts/kconfig/streamline_config.pl | |||
@@ -589,7 +589,7 @@ while ($repeat) { | |||
589 | 589 | ||
590 | # Now we need to see if we have to check selects; | 590 | # Now we need to see if we have to check selects; |
591 | loop_select; | 591 | loop_select; |
592 | } | 592 | } |
593 | 593 | ||
594 | my %setconfigs; | 594 | my %setconfigs; |
595 | 595 | ||
diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h index cfb8440cc0b2..6fdc97ef6023 100755 --- a/scripts/mkcompile_h +++ b/scripts/mkcompile_h | |||
@@ -68,7 +68,7 @@ UTS_TRUNCATE="cut -b -$UTS_LEN" | |||
68 | 68 | ||
69 | ( echo /\* This file is auto generated, version $VERSION \*/ | 69 | ( echo /\* This file is auto generated, version $VERSION \*/ |
70 | if [ -n "$CONFIG_FLAGS" ] ; then echo "/* $CONFIG_FLAGS */"; fi | 70 | if [ -n "$CONFIG_FLAGS" ] ; then echo "/* $CONFIG_FLAGS */"; fi |
71 | 71 | ||
72 | echo \#define UTS_MACHINE \"$ARCH\" | 72 | echo \#define UTS_MACHINE \"$ARCH\" |
73 | 73 | ||
74 | echo \#define UTS_VERSION \"`echo $UTS_VERSION | $UTS_TRUNCATE`\" | 74 | echo \#define UTS_VERSION \"`echo $UTS_VERSION | $UTS_TRUNCATE`\" |
@@ -84,7 +84,7 @@ UTS_TRUNCATE="cut -b -$UTS_LEN" | |||
84 | # recompilations. | 84 | # recompilations. |
85 | # We don't consider the file changed if only the date/time changed. | 85 | # We don't consider the file changed if only the date/time changed. |
86 | # A kernel config change will increase the generation number, thus | 86 | # A kernel config change will increase the generation number, thus |
87 | # causing compile.h to be updated (including date/time) due to the | 87 | # causing compile.h to be updated (including date/time) due to the |
88 | # changed comment in the | 88 | # changed comment in the |
89 | # first line. | 89 | # first line. |
90 | 90 | ||
diff --git a/scripts/mkmakefile b/scripts/mkmakefile index 0cc044260744..84af27bf0f99 100644 --- a/scripts/mkmakefile +++ b/scripts/mkmakefile | |||
@@ -42,18 +42,11 @@ MAKEARGS += O=\$(if \$(patsubst /%,,\$(makedir)),\$(CURDIR)/)\$(patsubst %/,%,\$ | |||
42 | 42 | ||
43 | MAKEFLAGS += --no-print-directory | 43 | MAKEFLAGS += --no-print-directory |
44 | 44 | ||
45 | .PHONY: all \$(MAKECMDGOALS) | 45 | .PHONY: __sub-make \$(MAKECMDGOALS) |
46 | 46 | ||
47 | all := \$(filter-out all Makefile,\$(MAKECMDGOALS)) | 47 | __sub-make: |
48 | \$(Q)\$(MAKE) \$(MAKEARGS) \$(MAKECMDGOALS) | ||
48 | 49 | ||
49 | all: | 50 | \$(filter-out __sub-make, \$(MAKECMDGOALS)): __sub-make |
50 | \$(Q)\$(MAKE) \$(MAKEARGS) \$(all) | ||
51 | |||
52 | Makefile:; | ||
53 | |||
54 | \$(all): all | ||
55 | @: | ||
56 | |||
57 | %/: all | ||
58 | @: | 51 | @: |
59 | EOF | 52 | EOF |
diff --git a/scripts/package/builddeb b/scripts/package/builddeb index f46e4dd0558d..b151b63f9be3 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb | |||
@@ -130,7 +130,7 @@ if [ "$ARCH" = "um" ] ; then | |||
130 | cp System.map "$tmpdir/usr/lib/uml/modules/$version/System.map" | 130 | cp System.map "$tmpdir/usr/lib/uml/modules/$version/System.map" |
131 | cp $KCONFIG_CONFIG "$tmpdir/usr/share/doc/$packagename/config" | 131 | cp $KCONFIG_CONFIG "$tmpdir/usr/share/doc/$packagename/config" |
132 | gzip "$tmpdir/usr/share/doc/$packagename/config" | 132 | gzip "$tmpdir/usr/share/doc/$packagename/config" |
133 | else | 133 | else |
134 | cp System.map "$tmpdir/boot/System.map-$version" | 134 | cp System.map "$tmpdir/boot/System.map-$version" |
135 | cp $KCONFIG_CONFIG "$tmpdir/boot/config-$version" | 135 | cp $KCONFIG_CONFIG "$tmpdir/boot/config-$version" |
136 | fi | 136 | fi |
diff --git a/scripts/patch-kernel b/scripts/patch-kernel index d000ea3a41fd..49b4241e814a 100755 --- a/scripts/patch-kernel +++ b/scripts/patch-kernel | |||
@@ -27,7 +27,7 @@ | |||
27 | # Nick Holloway <Nick.Holloway@alfie.demon.co.uk>, 2nd January 1995. | 27 | # Nick Holloway <Nick.Holloway@alfie.demon.co.uk>, 2nd January 1995. |
28 | # | 28 | # |
29 | # Added support for handling multiple types of compression. What includes | 29 | # Added support for handling multiple types of compression. What includes |
30 | # gzip, bzip, bzip2, zip, compress, and plaintext. | 30 | # gzip, bzip, bzip2, zip, compress, and plaintext. |
31 | # | 31 | # |
32 | # Adam Sulmicki <adam@cfar.umd.edu>, 1st January 1997. | 32 | # Adam Sulmicki <adam@cfar.umd.edu>, 1st January 1997. |
33 | # | 33 | # |
@@ -159,7 +159,7 @@ applyPatch () { | |||
159 | fi | 159 | fi |
160 | # Remove backup files | 160 | # Remove backup files |
161 | find $sourcedir/ '(' -name '*.orig' -o -name '.*.orig' ')' -exec rm -f {} \; | 161 | find $sourcedir/ '(' -name '*.orig' -o -name '.*.orig' ')' -exec rm -f {} \; |
162 | 162 | ||
163 | return 0; | 163 | return 0; |
164 | } | 164 | } |
165 | 165 | ||