From: Linus Torvalds Date: Fri, 12 Jul 2019 23:03:16 +0000 (-0700) Subject: Merge tag 'kbuild-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy... X-Git-Tag: v5.3-rc1~111 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=39ceda5ce1b002e30563fcb8ad1bb5ac8e4d59ee;p=linux.git 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 ... --- 39ceda5ce1b002e30563fcb8ad1bb5ac8e4d59ee diff --cc Documentation/kbuild/kbuild.rst index e774e760522d,dcfeb32e3360..b25548963d70 --- a/Documentation/kbuild/kbuild.rst +++ b/Documentation/kbuild/kbuild.rst @@@ -200,8 -183,17 +200,17 @@@ The output directory is often set usin The value can be overridden in which case the default value is ignored. + KBUILD_ABS_SRCTREE + -------------------------------------------------- + Kbuild uses a relative path to point to the tree when possible. For instance, + when building in the source tree, the source tree path is '.' + + Setting this flag requests Kbuild to use absolute path to the source tree. + There are some useful cases to do so, like when generating tag files with + absolute path entries etc. + KBUILD_SIGN_PIN --------------------------------------------------- +--------------- This variable allows a passphrase or PIN to be passed to the sign-file utility when signing kernel modules, if the private key requires such. diff --cc Documentation/kbuild/makefiles.rst index 9274cdcc9bd2,b817e6cefb77..093f2d79ab95 --- a/Documentation/kbuild/makefiles.rst +++ b/Documentation/kbuild/makefiles.rst @@@ -995,15 -894,10 +995,11 @@@ When kbuild executes, the following ste means for an architecture to override the defaults. ---- 6.2 Add prerequisites to archheaders: +6.2 Add prerequisites to archheaders +------------------------------------ The archheaders: rule is used to generate header files that - may be installed into user space by "make header_install" or - "make headers_install_all". In order to support - "make headers_install_all", this target has to be able to run - on an unconfigured tree, or a tree configured for another - architecture. + may be installed into user space by "make header_install". It is run before "make archprepare" when run on the architecture itself. @@@ -1140,18 -1018,33 +1136,34 @@@ In this example, extra-y is used to list object files that shall be built, but shall not be linked as part of built-in.a. + header-test-y + + header-test-y specifies headers (*.h) in the current directory that + should be compile tested to ensure they are self-contained, + i.e. compilable as standalone units. If CONFIG_HEADER_TEST is enabled, + this builds them as part of extra-y. + + header-test-pattern-y + + This works as a weaker version of header-test-y, and accepts wildcard + patterns. The typical usage is: + + header-test-pattern-y += *.h + + This specifies all the files that matches to '*.h' in the current + directory, but the files in 'header-test-' are excluded. ---- 6.7 Commands useful for building a boot image +6.7 Commands useful for building a boot image +--------------------------------------------- - Kbuild provides a few macros that are useful when building a - boot image. + Kbuild provides a few macros that are useful when building a + boot image. if_changed - if_changed is the infrastructure used for the following commands. - Usage: + Usage:: + target: source(s) FORCE $(call if_changed,ld/objcopy/gzip/...) diff --cc scripts/Kbuild.include index ee58cde8ee3b,c62d690c7dcf..73e80b917f12 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@@ -210,15 -204,15 +204,15 @@@ objectify = $(foreach o,$(1),$(if $(fil # if_changed_dep - as if_changed, but uses fixdep to reveal dependencies # including used config symbols # if_changed_rule - as if_changed but execute rule instead -# See Documentation/kbuild/makefiles.txt for more info +# See Documentation/kbuild/makefiles.rst for more info ifneq ($(KBUILD_NOCMDDEP),1) - # Check if both arguments are the same including their order. Result is empty + # Check if both commands are the same including their order. Result is empty # string if equal. User may override this check using make KBUILD_NOCMDDEP=1 - arg-check = $(filter-out $(subst $(space),$(space_escape),$(strip $(cmd_$@))), \ + cmd-check = $(filter-out $(subst $(space),$(space_escape),$(strip $(cmd_$@))), \ $(subst $(space),$(space_escape),$(strip $(cmd_$1)))) else - arg-check = $(if $(strip $(cmd_$@)),,1) + cmd-check = $(if $(strip $(cmd_$@)),,1) endif # Replace >$< with >$$< to preserve $ when reloading the .cmd file