diff mbox series

[meta-oe,4/8] bpftool: Set ARCH for the kernel tools build

Message ID 20261019004122.2475327-4-khem.raj@oss.qualcomm.com
State New
Headers show
Series [meta-oe,1/8] luajit: Set TARGET_SYS to Linux for musl targets | expand

Commit Message

Khem Raj Oct. 19, 2026, 12:41 a.m. UTC
kernel-arch.bbclass no longer sets ARCH (oe-core 635f85b7b8), so
ARCH=${ARCH} expanded to an empty value and tools/scripts/Makefile.arch
fell back to the build host's uname -m. libbpf was then built with
tools/arch/x86/include, breaking cross builds, e.g. on riscv64:

  tools/arch/riscv/include/asm/barrier.h:13:10: fatal error: asm/fence.h: No such file or directory

Set ARCH from map_kernel_arch() as perf.bb does.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
 meta-oe/recipes-kernel/bpftool/bpftool.bb | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/meta-oe/recipes-kernel/bpftool/bpftool.bb b/meta-oe/recipes-kernel/bpftool/bpftool.bb
index 419be18d99..6a9fcc256d 100644
--- a/meta-oe/recipes-kernel/bpftool/bpftool.bb
+++ b/meta-oe/recipes-kernel/bpftool/bpftool.bb
@@ -9,6 +9,8 @@  inherit bash-completion kernelsrc kernel-arch

 do_populate_lic[depends] += "virtual/kernel:do_shared_workdir"

+ARCH = "${@oe.kernel.map_kernel_arch(d)}"
+
 EXTRA_OEMAKE = "\
     V=1 \
     -C ${S}/tools/bpf/bpftool \