diff mbox series

[meta,05/06] kernel-devsrc: copy arch/x86 vdso2c sources for on-target prepare

Message ID 20260821112509.861559-6-bruce.ashfield@gmail.com
State New
Headers show
Series kernel-yocto: 6.18 and 7.2 RFC/prep | expand

Commit Message

Bruce Ashfield Aug. 21, 2026, 11:25 a.m. UTC
From: Bruce Ashfield <bruce.ashfield@gmail.com>

Since 7.2, arch/x86/tools/Makefile adds vdso2c to hostprogs with
"always-y := $(hostprogs)", so the archscripts target run by
"make scripts prepare" now always builds arch/x86/tools/vdso2c. Without
its sources in the devsrc tree the on-target prepare fails:

  make[2]: *** No rule to make target 'arch/x86/tools/vdso2c.c', needed
  by 'arch/x86/tools/vdso2c'.  Stop.

Copy vdso2c.c and its vdso2c.h alongside the relocs sources; the
<tools/le_byteshift.h> dependency is already shipped. 6.18 and earlier
still have the sources (just unused there), so the copy is safe across
versions.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
---
 meta/recipes-kernel/linux/kernel-devsrc.bb | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb b/meta/recipes-kernel/linux/kernel-devsrc.bb
index 47c0abfa38..2d80278830 100644
--- a/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -326,6 +326,9 @@  do_install() {
             cp -a --parents arch/x86/tools/relocs.c $kerneldir/build/
             cp -a --parents arch/x86/tools/relocs_common.c $kerneldir/build/
             cp -a --parents arch/x86/tools/relocs.h $kerneldir/build/
+            # v7.2+ archscripts also builds the vdso2c host tool
+            cp -a --parents arch/x86/tools/vdso2c.c $kerneldir/build/ 2>/dev/null || :
+            cp -a --parents arch/x86/tools/vdso2c.h $kerneldir/build/ 2>/dev/null || :
             cp -a --parents arch/x86/tools/gen-insn-attr-x86.awk $kerneldir/build/ 2>/dev/null || :
             cp -a --parents arch/x86/tools/cpufeaturemasks.awk $kerneldir/build/ 2>/dev/null || :
             cp -a --parents arch/x86/purgatory/purgatory.c $kerneldir/build/