kbuild: force to build vmlinux if CONFIG_MODVERSION=y
authorMasahiro Yamada <masahiroy@kernel.org>
Sun, 31 May 2020 08:47:06 +0000 (17:47 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Jun 2020 07:31:24 +0000 (09:31 +0200)
commite4f7a7260737a040d43c64c0eb1421daeb83f583
tree3badbeeff78821c871bf6ddebd1882bb454fb4de
parent1b0d830e0ce03679fe92a0501f5c7990a2952c21
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>
Makefile