Skip to contentSkip to conversation

kbuild: fix empty ${PYTHON} in scripts/link-vmlinux.sh

PATCH In review Masahiro Yamada 3 participants 4 messages Mar 29, 2022 – Apr 1, 2022 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kbuild: fix empty ${PYTHON} in scripts/link-vmlinux.sh

The two commits

d8d2d38275c1 ("kbuild: remove PYTHON variable") a8cccdd95473 ("init: lto: ensure initcall ordering")

were applied in the same development cycle, in two different trees.

After they were merged together, this ${PYTHON} expands to an empty string.

Therefore, ${srctree}/scripts/jobserver-exec is executed directly. (it has the executable bit set)

This is working but let's fix the code into the intended form.

---

 scripts/link-vmlinux.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/link-vmlinux.sh +1 -1
index f704034ebbe6..20f44504a644 100755
@@ -50,7 +50,7 @@ gen_initcalls()
 {
 	info GEN .tmp_initcalls.lds
 
-	${PYTHON} ${srctree}/scripts/jobserver-exec		\
+	${PYTHON3} ${srctree}/scripts/jobserver-exec		\
 	${PERL} ${srctree}/scripts/generate_initcall_order.pl	\
 		${KBUILD_VMLINUX_OBJS} ${KBUILD_VMLINUX_LIBS}	\
 		> .tmp_initcalls.lds
Signature · 1 line
2.32.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Masahiro Yamada

The two commits

d8d2d38275c1 ("kbuild: remove PYTHON variable") a8cccdd95473 ("init: lto: ensure initcall ordering")

were applied in the same development cycle, in two different trees.

Quoted 7 lines

After they were merged together, this ${PYTHON} expands to an empty string.

Therefore, ${srctree}/scripts/jobserver-exec is executed directly. (it has the executable bit set)

This is working but let's fix the code into the intended form.

Thanks for the patch!

Quoted 23 lines

---

 scripts/link-vmlinux.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/link-vmlinux.sh +1 -2
index f704034ebbe6..20f44504a644 100755
@@ -50,7 +50,7 @@ gen_initcalls()
 {
        info GEN .tmp_initcalls.lds
 
-       ${PYTHON} ${srctree}/scripts/jobserver-exec             \
+       ${PYTHON3} ${srctree}/scripts/jobserver-exec            \
        ${PERL} ${srctree}/scripts/generate_initcall_order.pl   \
                ${KBUILD_VMLINUX_OBJS} ${KBUILD_VMLINUX_LIBS}   \
                > .tmp_initcalls.lds
--

2.32.0

Signature · 2 lines
Thanks,
~Nick Desaulniers
Reviewed-by
#2 lore raw
Quoted 13 lines · Nick Desaulniers
Quoted 11 lines · Masahiro Yamada

The two commits

d8d2d38275c1 ("kbuild: remove PYTHON variable") a8cccdd95473 ("init: lto: ensure initcall ordering")

were applied in the same development cycle, in two different trees.

After they were merged together, this ${PYTHON} expands to an empty string.

Quoted 8 lines
Quoted 4 lines

Therefore, ${srctree}/scripts/jobserver-exec is executed directly. (it has the executable bit set)

This is working but let's fix the code into the intended form.

Thanks for the patch!

Good catch.
I was not aware that scripts/jobserver-exec was executable. Debian/unstable now switched to python v3.10.x as default "python3" and I will have this patch in my next series for testing. Thanks.

- Sedat -

Quoted 28 lines
Quoted 21 lines

---

 scripts/link-vmlinux.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/link-vmlinux.sh +1 -2
index f704034ebbe6..20f44504a644 100755
@@ -50,7 +50,7 @@ gen_initcalls()
 {
        info GEN .tmp_initcalls.lds
 
-       ${PYTHON} ${srctree}/scripts/jobserver-exec             \
+       ${PYTHON3} ${srctree}/scripts/jobserver-exec            \
        ${PERL} ${srctree}/scripts/generate_initcall_order.pl   \
                ${KBUILD_VMLINUX_OBJS} ${KBUILD_VMLINUX_LIBS}   \
                > .tmp_initcalls.lds
--
Quoted 2 lines

2.32.0

--
Thanks,
~Nick Desaulniers

#3 lore raw
In reply to Masahiro Yamada
Quoted 11 lines · Masahiro Yamada

The two commits

d8d2d38275c1 ("kbuild: remove PYTHON variable") a8cccdd95473 ("init: lto: ensure initcall ordering")

were applied in the same development cycle, in two different trees.

After they were merged together, this ${PYTHON} expands to an empty string.

Quoted 7 lines

Therefore, ${srctree}/scripts/jobserver-exec is executed directly. (it has the executable bit set)

This is working but let's fix the code into the intended form.

---

Applied to linux-kbuild/fixes.

Quoted 20 lines
 scripts/link-vmlinux.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/link-vmlinux.sh +1 -2
index f704034ebbe6..20f44504a644 100755
@@ -50,7 +50,7 @@ gen_initcalls()
 {
        info GEN .tmp_initcalls.lds
 
-       ${PYTHON} ${srctree}/scripts/jobserver-exec             \
+       ${PYTHON3} ${srctree}/scripts/jobserver-exec            \
        ${PERL} ${srctree}/scripts/generate_initcall_order.pl   \
                ${KBUILD_VMLINUX_OBJS} ${KBUILD_VMLINUX_LIBS}   \
                > .tmp_initcalls.lds
--

2.32.0

Signature · 2 lines
Best Regards
Masahiro Yamada