Skip to contentSkip to conversation

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

PATCH Applied Masahiro Yamada 1 participant 2 messages Feb 10, 2020 – Feb 12, 2020 Kbuild

lore
Share & tools
lore
#0 lore raw

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

Since commit 56d589361572 ("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 56d589361572 ("kbuild: do not create orphan built-in.a or obj-y objects")

---

 scripts/link-vmlinux.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/link-vmlinux.sh +1 -1
index 1919c311c149..dd484e92752e 100755
@@ -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
Signature · 1 line
2.17.1
author Applied
#1 lore raw
Quoted 13 lines · Masahiro Yamada

Since commit 56d589361572 ("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
Quoted 7 lines

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 56d589361572 ("kbuild: do not create orphan built-in.a or obj-y objects")

---

Applied.

Quoted 19 lines
 scripts/link-vmlinux.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/link-vmlinux.sh +1 -2
index 1919c311c149..dd484e92752e 100755
@@ -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
--

2.17.1

Signature · 2 lines
Best Regards
Masahiro Yamada