]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
perf: do builds in a clean build tree
authorRoss Burton <ross.burton@arm.com>
Thu, 25 Sep 2025 15:26:51 +0000 (16:26 +0100)
committerMathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Fri, 26 Sep 2025 15:03:03 +0000 (17:03 +0200)
Set B to WORKDIR/build and clean that on configure so we ensure that the
build tree is clean.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
meta/recipes-kernel/perf/perf.bb

index 3b9e52fdb841f5befa9182712b9e79635745db59..00b869e8b1837aa200d62f510ade75fc244761d6 100644 (file)
@@ -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
 }