From b990e52583a7d84fbcd8efa7b5eec82c5f93bdcc Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 18 Oct 2026 16:57:10 -0700 Subject: [PATCH] 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 --- meta-oe/recipes-kernel/bpftool/bpftool.bb | 2 ++ 1 file changed, 2 insertions(+) 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 \