bpftool: Set ARCH for the kernel tools build

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>
This commit is contained in:
Khem Raj committed 2026-10-18 16:57:55 -07:00
1 parent e4d5a8c1ab
commit b990e52583
1 file changed
+2
@@ -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 \