The kernel's Makefile.config has two BUILD_BPF_SKEL checks: - Line 219: ifeq ($(BUILD_BPF_SKEL),1) - value check (works with =0) - Line 668: ifdef BUILD_BPF_SKEL - defined check (triggers for ANY value)
The previous fix (f48f6fb91c) passed BUILD_BPF_SKEL=0 which correctly skips the first check but still triggers the second 'ifdef' check, causing a build failure when clang is not available or too old. Change from: PACKAGECONFIG[bpf-skel] = ",BUILD_BPF_SKEL=0" To: PACKAGECONFIG[bpf-skel] = "BUILD_BPF_SKEL=1," When bpf-skel is not in PACKAGECONFIG (the default), nothing is passed to make and BUILD_BPF_SKEL remains undefined, which correctly skips both checks. When enabled, BUILD_BPF_SKEL=1 is passed. Also move the PACKAGECONFIG entry to be grouped with the other PACKAGECONFIG options for consistency. Signed-off-by: Jaipaul Cheernam <[email protected]> --- meta/recipes-kernel/perf/perf.bb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb index e3e5d55e39..65dc8e7538 100644 --- a/meta/recipes-kernel/perf/perf.bb +++ b/meta/recipes-kernel/perf/perf.bb @@ -40,6 +40,12 @@ PACKAGECONFIG[pfm4] = ",NO_LIBPFM4=1,libpfm4" PACKAGECONFIG[babeltrace] = ",NO_LIBBABELTRACE=1,babeltrace" PACKAGECONFIG[zstd] = ",NO_LIBZSTD=1,zstd" PACKAGECONFIG[llvm] = ",NO_LIBLLVM=1,llvm" +# Disable BUILD_BPF_SKEL by default. Use "BUILD_BPF_SKEL=1," format +# instead of ",BUILD_BPF_SKEL=0" because Make's ifdef triggers on any +# defined value including 0. Note: Rust-in-kernel support pulls in +# clang-native, satisfying the dependency checks and causing perf to +# attempt building bpftool, which fails without an adequate clang. +PACKAGECONFIG[bpf-skel] = "BUILD_BPF_SKEL=1," # libunwind is not yet ported for some architectures PACKAGECONFIG:remove:arc = "libunwind" @@ -439,8 +445,3 @@ perf_fix_sources () { done } -# Disable BUILD_BPF_SKEL by default. -# Rust in kernel support pulls in clang-native, which satisfies the -# BUILD_BPF_SKEL dependency checks and causes perf to attempt -# building bpftool, resulting in a build failure. -PACKAGECONFIG[bpf-skel] = ",BUILD_BPF_SKEL=0" -- 2.34.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#239774): https://lists.openembedded.org/g/openembedded-core/message/239774 Mute This Topic: https://lists.openembedded.org/mt/120029738/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
