summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2025-09-11 12:36:12 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-09-12 10:30:53 +0100
commitdcb834c4f8ebbef967c9e92e008d288ad5278e90 (patch)
tree84af1d333987b97dd7bddcb5e101ff74f1e5f3c0
parent37b5281e90ee1cc0e7c38ae1d24d0197d041d081 (diff)
downloadpoky-dcb834c4f8ebbef967c9e92e008d288ad5278e90.tar.gz
perf: Fix reproducibility issue
Perf's build process generates two copies of its internal headers, one at tools/lib/perf/include/internal and one at libperf/include/internal with files like xyarray.h. Although the files are identical, the binaries including them would see them at different paths and have different debuginfo data. To avoid this, build libperf.a first, which will ensure the libperf headers directory exists. This is used in preference to the other by the build process and results in consistent binaries. (From OE-Core rev: 0a886fcacaab0fbce1306c0f99d482f940a8f705) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-kernel/perf/perf.bb4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index b142b090b5..e1915207ee 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -171,6 +171,10 @@ do_compile() {
171 sed -i -e 's|\$(libdir)/traceevent/plugins|\$(libdir)/traceevent_${KERNEL_VERSION}/plugins|g' ${S}/tools/lib/traceevent/plugins/Makefile 171 sed -i -e 's|\$(libdir)/traceevent/plugins|\$(libdir)/traceevent_${KERNEL_VERSION}/plugins|g' ${S}/tools/lib/traceevent/plugins/Makefile
172 test -e ${S}/tools/perf/Makefile.config && \ 172 test -e ${S}/tools/perf/Makefile.config && \
173 sed -i -e 's|\$(libdir)/traceevent/plugins|\$(libdir)/traceevent_${KERNEL_VERSION}/plugins|g' ${S}/tools/perf/Makefile.config 173 sed -i -e 's|\$(libdir)/traceevent/plugins|\$(libdir)/traceevent_${KERNEL_VERSION}/plugins|g' ${S}/tools/perf/Makefile.config
174 # There are two copies of internal headers such as:
175 # libperf/include/internal/xyarray.h and tools/lib/perf/include/internal/xyarray.h
176 # For reproducibile binaries, we need to find one copy, hence force libperf to be created first
177 oe_runmake ${B}/libperf/libperf.a
174 oe_runmake all 178 oe_runmake all
175} 179}
176 180