From 6c21b85973006c0d58caa0d845ef6fbefeb45bff Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Thu, 25 Sep 2025 16:26:51 +0100 Subject: [PATCH] perf: do builds in a clean build tree Set B to WORKDIR/build and clean that on configure so we ensure that the build tree is clean. Signed-off-by: Ross Burton Signed-off-by: Mathieu Dubois-Briand --- meta/recipes-kernel/perf/perf.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb index 3b9e52fdb8..00b869e8b1 100644 --- a/meta/recipes-kernel/perf/perf.bb +++ b/meta/recipes-kernel/perf/perf.bb @@ -69,6 +69,8 @@ include ${@bb.utils.contains('PACKAGECONFIG', 'perl', 'perf-perl.inc', '', d)} inherit kernelsrc S = "${UNPACKDIR}/${BP}" +B = "${WORKDIR}/build" +do_configure[cleandirs] += "${B}" # The LDFLAGS is required or some old kernels fails due missing # symbols and this is preferred than requiring patches to every old @@ -424,7 +426,7 @@ perf_fix_sources () { util/pmu-flex.h util/expr-flex.h util/expr-flex.c; do f=${PKGD}${TARGET_DBGSRC_DIR}/$f if [ -e $f ]; then - sed -i -e 's#${S}/##g' $f + sed -i -e 's#${B}/##g' $f fi done } -- 2.47.3