diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-12 19:03:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-12 19:03:16 -0400 |
commit | 39ceda5ce1b002e30563fcb8ad1bb5ac8e4d59ee (patch) | |
tree | 18751f981a3a540379b9f4b01292e1b4f401aa38 /scripts/Kbuild.include | |
parent | 5f26f1143678d0fed8115afdcc0de99ee7cc9675 (diff) | |
parent | d4a74bbfee03acf7bbddc77b9c9236462c744fc7 (diff) |
Merge tag 'kbuild-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild updates from Masahiro Yamada:
- remove headers_{install,check}_all targets
- remove unreasonable 'depends on !UML' from CONFIG_SAMPLES
- re-implement 'make headers_install' more cleanly
- add new header-test-y syntax to compile-test headers
- compile-test exported headers to ensure they are compilable in
user-space
- compile-test headers under include/ to ensure they are self-contained
- remove -Waggregate-return, -Wno-uninitialized, -Wno-unused-value
flags
- add -Werror=unknown-warning-option for Clang
- add 128-bit built-in types support to genksyms
- fix missed rebuild of modules.builtin
- propagate 'No space left on device' error in fixdep to Make
- allow Clang to use its integrated assembler
- improve some coccinelle scripts
- add a new flag KBUILD_ABS_SRCTREE to request Kbuild to use absolute
path for $(srctree).
- do not ignore errors when compression utility is missing
- misc cleanups
* tag 'kbuild-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (49 commits)
kbuild: use -- separater intead of $(filter-out ...) for cc-cross-prefix
kbuild: Inform user to pass ARCH= for make mrproper
kbuild: fix compression errors getting ignored
kbuild: add a flag to force absolute path for srctree
kbuild: replace KBUILD_SRCTREE with boolean building_out_of_srctree
kbuild: remove src and obj from the top Makefile
scripts/tags.sh: remove unused environment variables from comments
scripts/tags.sh: drop SUBARCH support for ARM
kbuild: compile-test kernel headers to ensure they are self-contained
kheaders: include only headers into kheaders_data.tar.xz
kheaders: remove meaningless -R option of 'ls'
kbuild: support header-test-pattern-y
kbuild: do not create wrappers for header-test-y
kbuild: compile-test exported headers to ensure they are self-contained
init/Kconfig: add CONFIG_CC_CAN_LINK
kallsyms: exclude kasan local symbols on s390
kbuild: add more hints about SUBDIRS replacement
coccinelle: api/stream_open: treat all wait_.*() calls as blocking
coccinelle: put_device: Add a cast to an expression for an assignment
coccinelle: put_device: Adjust a message construction
...
Diffstat (limited to 'scripts/Kbuild.include')
-rw-r--r-- | scripts/Kbuild.include | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index ee58cde8ee3b..73e80b917f12 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
@@ -79,8 +79,8 @@ endef | |||
79 | # would try to directly execute the shell builtin 'command'. This workaround | 79 | # would try to directly execute the shell builtin 'command'. This workaround |
80 | # should be kept for a long time since this issue was fixed only after the | 80 | # should be kept for a long time since this issue was fixed only after the |
81 | # GNU Make 4.2.1 release. | 81 | # GNU Make 4.2.1 release. |
82 | cc-cross-prefix = $(firstword $(foreach c, $(filter-out -%, $(1)), \ | 82 | cc-cross-prefix = $(firstword $(foreach c, $(1), \ |
83 | $(if $(shell command -v $(c)gcc 2>/dev/null), $(c)))) | 83 | $(if $(shell command -v -- $(c)gcc 2>/dev/null), $(c)))) |
84 | 84 | ||
85 | # output directory for tests below | 85 | # output directory for tests below |
86 | TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/) | 86 | TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/) |
@@ -187,12 +187,6 @@ dtbinst := -f $(srctree)/scripts/Makefile.dtbinst obj | |||
187 | # $(Q)$(MAKE) $(clean)=dir | 187 | # $(Q)$(MAKE) $(clean)=dir |
188 | clean := -f $(srctree)/scripts/Makefile.clean obj | 188 | clean := -f $(srctree)/scripts/Makefile.clean obj |
189 | 189 | ||
190 | ### | ||
191 | # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.headersinst obj= | ||
192 | # Usage: | ||
193 | # $(Q)$(MAKE) $(hdr-inst)=dir | ||
194 | hdr-inst := -f $(srctree)/scripts/Makefile.headersinst obj | ||
195 | |||
196 | # echo command. | 190 | # echo command. |
197 | # Short version is used, if $(quiet) equals `quiet_', otherwise full one. | 191 | # Short version is used, if $(quiet) equals `quiet_', otherwise full one. |
198 | echo-cmd = $(if $($(quiet)cmd_$(1)),\ | 192 | echo-cmd = $(if $($(quiet)cmd_$(1)),\ |
@@ -213,12 +207,12 @@ objectify = $(foreach o,$(1),$(if $(filter /%,$(o)),$(o),$(obj)/$(o))) | |||
213 | # See Documentation/kbuild/makefiles.rst for more info | 207 | # See Documentation/kbuild/makefiles.rst for more info |
214 | 208 | ||
215 | ifneq ($(KBUILD_NOCMDDEP),1) | 209 | ifneq ($(KBUILD_NOCMDDEP),1) |
216 | # Check if both arguments are the same including their order. Result is empty | 210 | # Check if both commands are the same including their order. Result is empty |
217 | # string if equal. User may override this check using make KBUILD_NOCMDDEP=1 | 211 | # string if equal. User may override this check using make KBUILD_NOCMDDEP=1 |
218 | arg-check = $(filter-out $(subst $(space),$(space_escape),$(strip $(cmd_$@))), \ | 212 | cmd-check = $(filter-out $(subst $(space),$(space_escape),$(strip $(cmd_$@))), \ |
219 | $(subst $(space),$(space_escape),$(strip $(cmd_$1)))) | 213 | $(subst $(space),$(space_escape),$(strip $(cmd_$1)))) |
220 | else | 214 | else |
221 | arg-check = $(if $(strip $(cmd_$@)),,1) | 215 | cmd-check = $(if $(strip $(cmd_$@)),,1) |
222 | endif | 216 | endif |
223 | 217 | ||
224 | # Replace >$< with >$$< to preserve $ when reloading the .cmd file | 218 | # Replace >$< with >$$< to preserve $ when reloading the .cmd file |
@@ -231,15 +225,15 @@ make-cmd = $(call escsq,$(subst $(pound),$$(pound),$(subst $$,$$$$,$(cmd_$(1)))) | |||
231 | 225 | ||
232 | # Find any prerequisites that is newer than target or that does not exist. | 226 | # Find any prerequisites that is newer than target or that does not exist. |
233 | # PHONY targets skipped in both cases. | 227 | # PHONY targets skipped in both cases. |
234 | any-prereq = $(filter-out $(PHONY),$?) $(filter-out $(PHONY) $(wildcard $^),$^) | 228 | any-prereq = $(filter-out $(PHONY),$?)$(filter-out $(PHONY) $(wildcard $^),$^) |
235 | 229 | ||
236 | # Execute command if command has changed or prerequisite(s) are updated. | 230 | # Execute command if command has changed or prerequisite(s) are updated. |
237 | if_changed = $(if $(strip $(any-prereq) $(arg-check)), \ | 231 | if_changed = $(if $(any-prereq)$(cmd-check), \ |
238 | $(cmd); \ | 232 | $(cmd); \ |
239 | printf '%s\n' 'cmd_$@ := $(make-cmd)' > $(dot-target).cmd, @:) | 233 | printf '%s\n' 'cmd_$@ := $(make-cmd)' > $(dot-target).cmd, @:) |
240 | 234 | ||
241 | # Execute the command and also postprocess generated .d dependencies file. | 235 | # Execute the command and also postprocess generated .d dependencies file. |
242 | if_changed_dep = $(if $(strip $(any-prereq) $(arg-check)),$(cmd_and_fixdep),@:) | 236 | if_changed_dep = $(if $(any-prereq)$(cmd-check),$(cmd_and_fixdep),@:) |
243 | 237 | ||
244 | cmd_and_fixdep = \ | 238 | cmd_and_fixdep = \ |
245 | $(cmd); \ | 239 | $(cmd); \ |
@@ -249,7 +243,7 @@ cmd_and_fixdep = \ | |||
249 | # Usage: $(call if_changed_rule,foo) | 243 | # Usage: $(call if_changed_rule,foo) |
250 | # Will check if $(cmd_foo) or any of the prerequisites changed, | 244 | # Will check if $(cmd_foo) or any of the prerequisites changed, |
251 | # and if so will execute $(rule_foo). | 245 | # and if so will execute $(rule_foo). |
252 | if_changed_rule = $(if $(strip $(any-prereq) $(arg-check)),$(rule_$(1)),@:) | 246 | if_changed_rule = $(if $(any-prereq)$(cmd-check),$(rule_$(1)),@:) |
253 | 247 | ||
254 | ### | 248 | ### |
255 | # why - tell why a target got built | 249 | # why - tell why a target got built |
@@ -274,8 +268,8 @@ ifeq ($(KBUILD_VERBOSE),2) | |||
274 | why = \ | 268 | why = \ |
275 | $(if $(filter $@, $(PHONY)),- due to target is PHONY, \ | 269 | $(if $(filter $@, $(PHONY)),- due to target is PHONY, \ |
276 | $(if $(wildcard $@), \ | 270 | $(if $(wildcard $@), \ |
277 | $(if $(strip $(any-prereq)),- due to: $(any-prereq), \ | 271 | $(if $(any-prereq),- due to: $(any-prereq), \ |
278 | $(if $(arg-check), \ | 272 | $(if $(cmd-check), \ |
279 | $(if $(cmd_$@),- due to command line change, \ | 273 | $(if $(cmd_$@),- due to command line change, \ |
280 | $(if $(filter $@, $(targets)), \ | 274 | $(if $(filter $@, $(targets)), \ |
281 | - due to missing .cmd file, \ | 275 | - due to missing .cmd file, \ |