aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-08-24 17:22:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-08-24 17:22:27 -0400
commitf7bbf0754b52b7f99deb0c8834f771e2b50157d6 (patch)
tree6f43e299feb1f40548010ce3e2bf16ae9793214d /scripts
parentb71a5e3fe81c01dbd0b80eab7ae47d4cbd57d72a (diff)
parent64236e315955cc59e2b612e6a0e59579395530ae (diff)
Merge tag 'kbuild-fixes-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild fixes from Masahiro Yamada: - fix linker script regression caused by dead code elimination support - fix typos and outdated comments - specify kselftest-clean as a PHONY target - fix "make dtbs_install" when $(srctree) includes shell special characters like '~' - Move -fshort-wchar to the global option list because defining it partially emits warnings * tag 'kbuild-fixes-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: update comments of Makefile.asm-generic kbuild: Do not use hyphen in exported variable name Makefile: add kselftest-clean to PHONY target list Kbuild: use -fshort-wchar globally fixdep: trivial: typo fix and correction kbuild: trivial cleanups on the comments kbuild: linker script do not match C names unless LD_DEAD_CODE_DATA_ELIMINATION is configured
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Kbuild.include7
-rw-r--r--scripts/Makefile.asm-generic4
-rw-r--r--scripts/Makefile.build8
-rw-r--r--scripts/Makefile.dtbinst4
-rw-r--r--scripts/basic/Makefile2
-rw-r--r--scripts/basic/fixdep.c6
6 files changed, 15 insertions, 16 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index dd8e2dde0b34..9ffd3dda3889 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -85,8 +85,8 @@ TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/)
85 85
86# try-run 86# try-run
87# Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise) 87# Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise)
88# Exit code chooses option. "$$TMP" is can be used as temporary file and 88# Exit code chooses option. "$$TMP" serves as a temporary file and is
89# is automatically cleaned up. 89# automatically cleaned up.
90try-run = $(shell set -e; \ 90try-run = $(shell set -e; \
91 TMP="$(TMPOUT).$$$$.tmp"; \ 91 TMP="$(TMPOUT).$$$$.tmp"; \
92 TMPO="$(TMPOUT).$$$$.o"; \ 92 TMPO="$(TMPOUT).$$$$.o"; \
@@ -261,7 +261,6 @@ make-cmd = $(call escsq,$(subst \#,\\\#,$(subst $$,$$$$,$(cmd_$(1)))))
261any-prereq = $(filter-out $(PHONY),$?) $(filter-out $(PHONY) $(wildcard $^),$^) 261any-prereq = $(filter-out $(PHONY),$?) $(filter-out $(PHONY) $(wildcard $^),$^)
262 262
263# Execute command if command has changed or prerequisite(s) are updated. 263# Execute command if command has changed or prerequisite(s) are updated.
264#
265if_changed = $(if $(strip $(any-prereq) $(arg-check)), \ 264if_changed = $(if $(strip $(any-prereq) $(arg-check)), \
266 @set -e; \ 265 @set -e; \
267 $(echo-cmd) $(cmd_$(1)); \ 266 $(echo-cmd) $(cmd_$(1)); \
@@ -315,7 +314,7 @@ if_changed_rule = $(if $(strip $(any-prereq) $(arg-check) ), \
315 $(rule_$(1)), @:) 314 $(rule_$(1)), @:)
316 315
317### 316###
318# why - tell why a a target got build 317# why - tell why a target got built
319# enabled by make V=2 318# enabled by make V=2
320# Output (listed in the order they are checked): 319# Output (listed in the order they are checked):
321# (1) - due to target is PHONY 320# (1) - due to target is PHONY
diff --git a/scripts/Makefile.asm-generic b/scripts/Makefile.asm-generic
index 95f7d8090152..a6c8c1780855 100644
--- a/scripts/Makefile.asm-generic
+++ b/scripts/Makefile.asm-generic
@@ -1,9 +1,9 @@
1# include/asm-generic contains a lot of files that are used 1# include/asm-generic contains a lot of files that are used
2# verbatim by several architectures. 2# verbatim by several architectures.
3# 3#
4# This Makefile reads the file arch/$(SRCARCH)/include/asm/Kbuild 4# This Makefile reads the file arch/$(SRCARCH)/include/$(src)/Kbuild
5# and for each file listed in this file with generic-y creates 5# and for each file listed in this file with generic-y creates
6# a small wrapper file in $(obj) (arch/$(SRCARCH)/include/generated/asm) 6# a small wrapper file in $(obj) (arch/$(SRCARCH)/include/generated/$(src))
7 7
8kbuild-file := $(srctree)/arch/$(SRCARCH)/include/$(src)/Kbuild 8kbuild-file := $(srctree)/arch/$(SRCARCH)/include/$(src)/Kbuild
9-include $(kbuild-file) 9-include $(kbuild-file)
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 4a9a2cec0a1b..f6152c70f7f4 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -229,8 +229,8 @@ ifeq ("$(origin RECORDMCOUNT_WARN)", "command line")
229endif 229endif
230# Due to recursion, we must skip empty.o. 230# Due to recursion, we must skip empty.o.
231# The empty.o file is created in the make process in order to determine 231# The empty.o file is created in the make process in order to determine
232# the target endianness and word size. It is made before all other C 232# the target endianness and word size. It is made before all other C
233# files, including recordmcount. 233# files, including recordmcount.
234sub_cmd_record_mcount = \ 234sub_cmd_record_mcount = \
235 if [ $(@) != "scripts/mod/empty.o" ]; then \ 235 if [ $(@) != "scripts/mod/empty.o" ]; then \
236 $(objtree)/scripts/recordmcount $(RECORDMCOUNT_FLAGS) "$(@)"; \ 236 $(objtree)/scripts/recordmcount $(RECORDMCOUNT_FLAGS) "$(@)"; \
@@ -245,13 +245,13 @@ sub_cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH
245 "$(LD)" "$(NM)" "$(RM)" "$(MV)" \ 245 "$(LD)" "$(NM)" "$(RM)" "$(MV)" \
246 "$(if $(part-of-module),1,0)" "$(@)"; 246 "$(if $(part-of-module),1,0)" "$(@)";
247recordmcount_source := $(srctree)/scripts/recordmcount.pl 247recordmcount_source := $(srctree)/scripts/recordmcount.pl
248endif 248endif # BUILD_C_RECORDMCOUNT
249cmd_record_mcount = \ 249cmd_record_mcount = \
250 if [ "$(findstring $(CC_FLAGS_FTRACE),$(_c_flags))" = \ 250 if [ "$(findstring $(CC_FLAGS_FTRACE),$(_c_flags))" = \
251 "$(CC_FLAGS_FTRACE)" ]; then \ 251 "$(CC_FLAGS_FTRACE)" ]; then \
252 $(sub_cmd_record_mcount) \ 252 $(sub_cmd_record_mcount) \
253 fi; 253 fi;
254endif 254endif # CONFIG_FTRACE_MCOUNT_RECORD
255 255
256ifdef CONFIG_STACK_VALIDATION 256ifdef CONFIG_STACK_VALIDATION
257ifneq ($(SKIP_STACK_VALIDATION),1) 257ifneq ($(SKIP_STACK_VALIDATION),1)
diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst
index 34614a48b717..993fb85982df 100644
--- a/scripts/Makefile.dtbinst
+++ b/scripts/Makefile.dtbinst
@@ -14,7 +14,7 @@ src := $(obj)
14PHONY := __dtbs_install 14PHONY := __dtbs_install
15__dtbs_install: 15__dtbs_install:
16 16
17export dtbinst-root ?= $(obj) 17export dtbinst_root ?= $(obj)
18 18
19include include/config/auto.conf 19include include/config/auto.conf
20include scripts/Kbuild.include 20include scripts/Kbuild.include
@@ -27,7 +27,7 @@ dtbinst-dirs := $(dts-dirs)
27quiet_cmd_dtb_install = INSTALL $< 27quiet_cmd_dtb_install = INSTALL $<
28 cmd_dtb_install = mkdir -p $(2); cp $< $(2) 28 cmd_dtb_install = mkdir -p $(2); cp $< $(2)
29 29
30install-dir = $(patsubst $(dtbinst-root)%,$(INSTALL_DTBS_PATH)%,$(obj)) 30install-dir = $(patsubst $(dtbinst_root)%,$(INSTALL_DTBS_PATH)%,$(obj))
31 31
32$(dtbinst-files): %.dtb: $(obj)/%.dtb 32$(dtbinst-files): %.dtb: $(obj)/%.dtb
33 $(call cmd,dtb_install,$(install-dir)) 33 $(call cmd,dtb_install,$(install-dir))
diff --git a/scripts/basic/Makefile b/scripts/basic/Makefile
index ec10d9345bc2..0372b33febe5 100644
--- a/scripts/basic/Makefile
+++ b/scripts/basic/Makefile
@@ -1,5 +1,5 @@
1### 1###
2# Makefile.basic lists the most basic programs used during the build process. 2# This Makefile lists the most basic programs used during the build process.
3# The programs listed herein are what are needed to do the basic stuff, 3# The programs listed herein are what are needed to do the basic stuff,
4# such as fix file dependencies. 4# such as fix file dependencies.
5# This initial step is needed to avoid files to be recompiled 5# This initial step is needed to avoid files to be recompiled
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index fff818b92acb..bbf62cb1f819 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -25,7 +25,7 @@
25 * 25 *
26 * So we play the same trick that "mkdep" played before. We replace 26 * So we play the same trick that "mkdep" played before. We replace
27 * the dependency on autoconf.h by a dependency on every config 27 * the dependency on autoconf.h by a dependency on every config
28 * option which is mentioned in any of the listed prequisites. 28 * option which is mentioned in any of the listed prerequisites.
29 * 29 *
30 * kconfig populates a tree in include/config/ with an empty file 30 * kconfig populates a tree in include/config/ with an empty file
31 * for each config symbol and when the configuration is updated 31 * for each config symbol and when the configuration is updated
@@ -34,7 +34,7 @@
34 * the config symbols are rebuilt. 34 * the config symbols are rebuilt.
35 * 35 *
36 * So if the user changes his CONFIG_HIS_DRIVER option, only the objects 36 * So if the user changes his CONFIG_HIS_DRIVER option, only the objects
37 * which depend on "include/linux/config/his/driver.h" will be rebuilt, 37 * which depend on "include/config/his/driver.h" will be rebuilt,
38 * so most likely only his driver ;-) 38 * so most likely only his driver ;-)
39 * 39 *
40 * The idea above dates, by the way, back to Michael E Chastain, AFAIK. 40 * The idea above dates, by the way, back to Michael E Chastain, AFAIK.
@@ -75,7 +75,7 @@
75 * and then basically copies the .<target>.d file to stdout, in the 75 * and then basically copies the .<target>.d file to stdout, in the
76 * process filtering out the dependency on autoconf.h and adding 76 * process filtering out the dependency on autoconf.h and adding
77 * dependencies on include/config/my/option.h for every 77 * dependencies on include/config/my/option.h for every
78 * CONFIG_MY_OPTION encountered in any of the prequisites. 78 * CONFIG_MY_OPTION encountered in any of the prerequisites.
79 * 79 *
80 * It will also filter out all the dependencies on *.ver. We need 80 * It will also filter out all the dependencies on *.ver. We need
81 * to make sure that the generated version checksum are globally up 81 * to make sure that the generated version checksum are globally up