From 934193a654c1f4d0643ddbf4b2529b508cae926e Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Sun, 1 Jul 2018 19:46:06 -0700 Subject: kbuild: verify that $DEPMOD is installed Verify that 'depmod' ($DEPMOD) is installed. This is a partial revert of commit 620c231c7a7f ("kbuild: do not check for ancient modutils tools"). Also update Documentation/process/changes.rst to refer to kmod instead of module-init-tools. Fixes kernel bugzilla #198965: https://bugzilla.kernel.org/show_bug.cgi?id=198965 Signed-off-by: Randy Dunlap Cc: Lucas De Marchi Cc: Lucas De Marchi Cc: Michal Marek Cc: Jessica Yu Cc: Chih-Wei Huang Cc: stable@vger.kernel.org # any kernel since 2012 Signed-off-by: Masahiro Yamada --- Documentation/process/changes.rst | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'Documentation') diff --git a/Documentation/process/changes.rst b/Documentation/process/changes.rst index ddc029734b25..005d8842a503 100644 --- a/Documentation/process/changes.rst +++ b/Documentation/process/changes.rst @@ -35,7 +35,7 @@ binutils 2.20 ld -v flex 2.5.35 flex --version bison 2.0 bison --version util-linux 2.10o fdformat --version -module-init-tools 0.9.10 depmod -V +kmod 13 depmod -V e2fsprogs 1.41.4 e2fsck -V jfsutils 1.1.3 fsck.jfs -V reiserfsprogs 3.6.3 reiserfsck -V @@ -156,12 +156,6 @@ is not build with ``CONFIG_KALLSYMS`` and you have no way to rebuild and reproduce the Oops with that option, then you can still decode that Oops with ksymoops. -Module-Init-Tools ------------------ - -A new module loader is now in the kernel that requires ``module-init-tools`` -to use. It is backward compatible with the 2.4.x series kernels. - Mkinitrd -------- @@ -371,16 +365,17 @@ Util-linux - +Kmod +---- + +- +- + Ksymoops -------- - -Module-Init-Tools ------------------ - -- - Mkinitrd -------- -- cgit v1.2.3 From 96f14fe738b69dd97a33efe3cc8ab330af5fd1f1 Mon Sep 17 00:00:00 2001 From: Laura Abbott Date: Mon, 9 Jul 2018 17:45:58 -0700 Subject: kbuild: Rename HOSTCFLAGS to KBUILD_HOSTCFLAGS In preparation for enabling command line CFLAGS, re-name HOSTCFLAGS to KBUILD_HOSTCFLAGS as the internal use only flags. This should not have any visible effects. Signed-off-by: Laura Abbott Signed-off-by: Masahiro Yamada --- Documentation/kbuild/makefiles.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index 048fc39a6b91..63655c1a3ad6 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt @@ -661,7 +661,7 @@ Both possibilities are described in the following. When compiling host programs, it is possible to set specific flags. The programs will always be compiled utilising $(HOSTCC) passed - the options specified in $(HOSTCFLAGS). + the options specified in $(KBUILD_HOSTCFLAGS). To set flags that will take effect for all host programs created in that Makefile, use the variable HOST_EXTRACFLAGS. -- cgit v1.2.3 From f92d19e0ef9bbbb2984845682e740934ad45473b Mon Sep 17 00:00:00 2001 From: Laura Abbott Date: Mon, 9 Jul 2018 17:46:02 -0700 Subject: kbuild: Use HOST*FLAGS options from the command line Now that we have the rename in place, reuse the HOST*FLAGS options as something that can be set from the command line and included with the rest of the flags. Signed-off-by: Laura Abbott Signed-off-by: Masahiro Yamada --- Documentation/kbuild/kbuild.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Documentation') diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt index 114c7ce7b58d..8390c360d4b3 100644 --- a/Documentation/kbuild/kbuild.txt +++ b/Documentation/kbuild/kbuild.txt @@ -50,6 +50,22 @@ LDFLAGS_MODULE -------------------------------------------------- Additional options used for $(LD) when linking modules. +HOSTCFLAGS +-------------------------------------------------- +Additional flags to be passed to $(HOSTCC) when building host programs. + +HOSTCXXFLAGS +-------------------------------------------------- +Additional flags to be passed to $(HOSTCXX) when building host programs. + +HOSTLDFLAGS +-------------------------------------------------- +Additional flags to be passed when linking host programs. + +HOSTLDLIBS +-------------------------------------------------- +Additional libraries to link against when building host programs. + KBUILD_KCONFIG -------------------------------------------------- Set the top-level Kconfig file to the value of this environment -- cgit v1.2.3 From bb81955fd4a49fffdd86d50afd0c1f2eea044c05 Mon Sep 17 00:00:00 2001 From: Dirk Gouders Date: Wed, 18 Jul 2018 11:13:36 +0200 Subject: kbuild: if_changed: document single use per target limitation Users of if_changed could easily feel invited to use it to divide a recipe into parts like: a: prereq FORCE $(call if_changed,do_a) $(call if_changed,do_b) But this is problematic, because if_changed should not be used more than once per target: in the above example, if_changed stores the command-line of the given command in .a.cmd and when a is up-to-date with respect to prereq, the file .a.cmd contains the command-line for the last command executed, i.e. do_b. When the recipe is then executed again, without any change of prerequisites, the command-line check for do_a will fail, do_a will be executed and stored in .a.cmd. The next check, however, will still see the old content (the file isn't re-read) and if_changed will skip do_b, because the command-line test will not recognize a change. On the next execution of the recipe the roles will flip: do_a is OK but do_b not and it will be executed. And so on... Signed-off-by: Dirk Gouders Signed-off-by: Masahiro Yamada --- Documentation/kbuild/makefiles.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Documentation') diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index 63655c1a3ad6..766355b1d221 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt @@ -1105,6 +1105,12 @@ When kbuild executes, the following steps are followed (roughly): target: source(s) FORCE #WRONG!# $(call if_changed, ld/objcopy/gzip/...) + Note: if_changed should not be used more than once per target. + It stores the executed command in a corresponding .cmd + file and multiple calls would result in overwrites and + unwanted results when the target is up to date and only the + tests on changed commands trigger execution of commands. + ld Link target. Often, LDFLAGS_$@ is used to set specific options to ld. -- cgit v1.2.3