diff mbox series

perf: do builds in a clean build tree

Message ID 20250925152651.3059868-1-ross.burton@arm.com
State New
Headers show
Series perf: do builds in a clean build tree | expand

Commit Message

Ross Burton Sept. 25, 2025, 3:26 p.m. UTC
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>
---
 meta/recipes-kernel/perf/perf.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Bruce Ashfield Sept. 25, 2025, 3:30 p.m. UTC | #1
On Thu, Sep 25, 2025 at 11:27 AM Ross Burton via lists.openembedded.org
<ross.burton=arm.com@lists.openembedded.org> wrote:

> Set B to WORKDIR/build and clean that on configure so we ensure that the
> build tree is clean.
>
>
Ack'd

There's no special reason for why we were building it without a designated
build
directory.

Bruce



> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
>  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 3b9e52fdb84..00b869e8b18 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.43.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#224043):
> https://lists.openembedded.org/g/openembedded-core/message/224043
> Mute This Topic: https://lists.openembedded.org/mt/115432523/1050810
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
diff mbox series

Patch

diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 3b9e52fdb84..00b869e8b18 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
 }