diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2020-05-31 17:47:06 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-06-22 09:05:29 +0200 |
commit | 5ec83ff4886f05ee53712e64017df0c45ad1d200 (patch) | |
tree | 98093f1d170ba350630a5b125e56e15b558a9a29 /Makefile | |
parent | 2c5757aa0c5fd325900dae682742a2101aa88bcf (diff) | |
download | linux-stable-5ec83ff4886f05ee53712e64017df0c45ad1d200.tar.gz linux-stable-5ec83ff4886f05ee53712e64017df0c45ad1d200.tar.bz2 linux-stable-5ec83ff4886f05ee53712e64017df0c45ad1d200.zip |
kbuild: force to build vmlinux if CONFIG_MODVERSION=y
commit 4b50c8c4eaf06a825d1c005c0b1b4a8307087b83 upstream.
This code does not work as stated in the comment.
$(CONFIG_MODVERSIONS) is always empty because it is expanded before
include/config/auto.conf is included. Hence, 'make modules' with
CONFIG_MODVERSION=y cannot record the version CRCs.
This has been broken since 2003, commit ("kbuild: Enable modules to be
build using the "make dir/" syntax"). [1]
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=15c6240cdc44bbeef3c4797ec860f9765ef4f1a7
Cc: linux-stable <stable@vger.kernel.org> # v2.5.71+
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -554,12 +554,8 @@ KBUILD_MODULES := KBUILD_BUILTIN := 1 # If we have only "make modules", don't compile built-in objects. -# When we're building modules with modversions, we need to consider -# the built-in objects during the descend as well, in order to -# make sure the checksums are up to date before we record them. - ifeq ($(MAKECMDGOALS),modules) - KBUILD_BUILTIN := $(if $(CONFIG_MODVERSIONS),1) + KBUILD_BUILTIN := endif # If we have "make <whatever> modules", compile modules @@ -1229,6 +1225,13 @@ ifdef CONFIG_MODULES all: modules +# When we're building modules with modversions, we need to consider +# the built-in objects during the descend as well, in order to +# make sure the checksums are up to date before we record them. +ifdef CONFIG_MODVERSIONS + KBUILD_BUILTIN := 1 +endif + # Build modules # # A module can be listed more than once in obj-m resulting in |