kbuild: fix mismatch between .version and include/generated/compile.h

Since commit 56d5893615 ("kbuild: do not create orphan built-in.a or
obj-y objects"), scripts/link-vmlinux.sh does nothing when descending
into init/.

Once the version number becomes out of sync between .version and
include/generated/compile.h, it is not self-healing.

[How to reproduce]

 $ echo 100 > .version
 $ make

You will see the number in the .version is always bigger than that in
compile.h by one. After this, every time you run 'make', the vmlinux is
re-linked even when none of source files is updated.

Fixes: 56d5893615 ("kbuild: do not create orphan built-in.a or obj-y objects")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
Masahiro Yamada 2020-02-11 05:06:34 +09:00
parent 9d1b38958b
commit 083bc0e1ce
1 changed files with 1 additions and 1 deletions

View File

@ -239,7 +239,7 @@ else
fi;
# final build of init/
${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init
${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init need-builtin=1
#link vmlinux.o
info LD vmlinux.o