diff options
authorReinette Chatre <>2015-08-11 14:12:20 -0700
committerRichard Purdie <>2015-08-12 15:43:36 -0700
commit08f9fbbc97909698b56200aa9be5fe50b99a44b2 (patch)
parent5954c4e593070be7b1b8e26c1df0ec808a9366bd (diff)
perf: fix build breakage on kernels after 4.1
A recent commit fixed perf build failures with a change that duplicates a fix that can be found in kernels after 4.1. Unfortunately there is a conflict between these two fixes and we see perf build failures when building perf in kernels that contain the fix already. The problem is that the fix from the recipe modifies the location of .config-detected to $(OUTPUT).config-detected. In a 4.2 kernel the location will be changed to $(OUTPUT)$(OUTPUT).config-detected. We change the recipe to require a space in the pattern to only change kernel sources that do not already place file in $(OUTPUT). The recent commit that introduced the build failure is: commit ea9016b60b47138bc58d84a06954b44527b20a19 Author: Richard Purdie <> Date: Sat Jul 25 14:37:58 2015 +0100 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 <> The commit in the kernel source that fixes the problem from kernel side is: commit 642273795fa81da11290ffa90bce6ff242f2a7bb Author: Aaro Koskinen <> Date: Wed Jul 1 14:54:42 2015 +0300 perf tools: Create config.detected into OUTPUT directory Create config.detected into OUTPUT directory instead of source directory. This fixes parallel builds that share the same source directory. Signed-off-by: Aaro Koskinen <> Acked-by: Jiri Olsa <> Cc: Paul Mackerras <> Cc: Peter Zijlstra <> Link: Signed-off-by: Arnaldo Carvalho de Melo <> (From OE-Core rev: 6546771a502a09c63e33679be8784818be0ef93b) Signed-off-by: Reinette Chatre <> Signed-off-by: Richard Purdie <>
1 files changed, 4 insertions, 3 deletions
diff --git a/meta/recipes-kernel/perf/ b/meta/recipes-kernel/perf/
index f8e80d0..e7ddfff 100644
--- a/meta/recipes-kernel/perf/
+++ b/meta/recipes-kernel/perf/
@@ -134,6 +134,7 @@ do_configure_prepend () {
# config/Makefile.
# Also need to relocate .config-detected to $(OUTPUT)/config-detected
+ # for kernel sources that do not already do this
# as two builds (e.g. perf and lib32-perf from mutlilib can conflict
# with each other if its in the shared source directory
@@ -141,15 +142,15 @@ do_configure_prepend () {
# 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' \
+ -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \
if [ -e "${S}/tools/perf/Makefile.perf" ]; then
- sed -i -e 's,\.config-detected,$(OUTPUT)/config-detected,g' \
+ sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \
if [ -e "${S}/tools/build/" ]; then
- sed -i -e 's,\.config-detected,$(OUTPUT)/config-detected,g' \
+ sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \
OpenPOWER on IntegriCloud