summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/perf
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-25 14:37:58 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-09 16:37:44 -0700
commitea9016b60b47138bc58d84a06954b44527b20a19 (patch)
tree8bfce3699ce0ac90a192405253fbb32b9436583a /meta/recipes-kernel/perf
parent3b732f01c9c28454a29da95761a7e0a6a659547d (diff)
downloadast2050-yocto-poky-ea9016b60b47138bc58d84a06954b44527b20a19.zip
ast2050-yocto-poky-ea9016b60b47138bc58d84a06954b44527b20a19.tar.gz
perf: Fix config file conflict with 4.1 kernels
If you setup mutlitlibs and then: bitbake perf libb32-perf bitbake perf libb32-perf -c cleansstate bitbake perf libb32-perf you will see races where the two builds get confused about which directory they should be using and they corrupt each other. The issue is that .config-detected is created in ${S}, not $(OUTPUT). We can fix this by moving the file to $(OUTPUT). [YCOTO #8043] (From OE-Core rev: 00608cffffb586e8d2a2075117e710113c471448) (From OE-Core rev: 57df1ebd910e42af47a0039830a60f41a3bd29b6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/perf')
-rw-r--r--meta/recipes-kernel/perf/perf.bb15
1 files changed, 15 insertions, 0 deletions
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index eb27374..f8e80d0 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -132,12 +132,27 @@ do_configure_prepend () {
# 64 bit build (and library) are not exected. To ensure that libraries are
# installed to the correct location, we can use the weak assignment in the
# config/Makefile.
+ #
+ # Also need to relocate .config-detected to $(OUTPUT)/config-detected
+ # as two builds (e.g. perf and lib32-perf from mutlilib can conflict
+ # with each other if its in the shared source directory
+ #
if [ -e "${S}/tools/perf/config/Makefile" ]; then
# Match $(prefix)/$(lib) and $(prefix)/lib
sed -i -e 's,^libdir = \($(prefix)/.*lib\),libdir ?= \1,' \
-e 's,^perfexecdir = \(.*\),perfexecdir ?= \1,' \
+ -e 's,\.config-detected,$(OUTPUT)/config-detected,g' \
${S}/tools/perf/config/Makefile
fi
+ if [ -e "${S}/tools/perf/Makefile.perf" ]; then
+ sed -i -e 's,\.config-detected,$(OUTPUT)/config-detected,g' \
+ ${S}/tools/perf/Makefile.perf
+ fi
+ if [ -e "${S}/tools/build/Makefile.build" ]; then
+ sed -i -e 's,\.config-detected,$(OUTPUT)/config-detected,g' \
+ ${S}/tools/build/Makefile.build
+ fi
+
# We need to ensure the --sysroot option in CC is preserved
if [ -e "${S}/tools/perf/Makefile.perf" ]; then
sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/perf/Makefile.perf
OpenPOWER on IntegriCloud