diff options
author | Reinette Chatre <reinette.chatre@intel.com> | 2015-08-11 14:12:20 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-08-12 11:31:49 -0700 |
commit | a533776d6ff83b6e3e830137455b8382d002768b (patch) | |
tree | 71ab1045e50ef824fd944cd4f28b6003eebf793d | |
parent | 0f7df92e3d2dbbb4c94299171d5d0287887e0d28 (diff) | |
download | poky-a533776d6ff83b6e3e830137455b8382d002768b.tar.gz |
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 <richard.purdie@linuxfoundation.org>
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 <richard.purdie@linuxfoundation.org>
The commit in the kernel source that fixes the problem from kernel side is:
commit 642273795fa81da11290ffa90bce6ff242f2a7bb
Author: Aaro Koskinen <aaro.koskinen@nokia.com>
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 <aaro.koskinen@nokia.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1435751683-18500-1-git-send-email-aaro.koskinen@nokia.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
(From OE-Core rev: cb8d309ff0ea0ca11edc2aae75ddd869491cb330)
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-kernel/perf/perf.bb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb index 246f1b47f7..b18e474de9 100644 --- a/meta/recipes-kernel/perf/perf.bb +++ b/meta/recipes-kernel/perf/perf.bb | |||
@@ -129,6 +129,7 @@ do_configure_prepend () { | |||
129 | # config/Makefile. | 129 | # config/Makefile. |
130 | # | 130 | # |
131 | # Also need to relocate .config-detected to $(OUTPUT)/config-detected | 131 | # Also need to relocate .config-detected to $(OUTPUT)/config-detected |
132 | # for kernel sources that do not already do this | ||
132 | # as two builds (e.g. perf and lib32-perf from mutlilib can conflict | 133 | # as two builds (e.g. perf and lib32-perf from mutlilib can conflict |
133 | # with each other if its in the shared source directory | 134 | # with each other if its in the shared source directory |
134 | # | 135 | # |
@@ -136,15 +137,15 @@ do_configure_prepend () { | |||
136 | # Match $(prefix)/$(lib) and $(prefix)/lib | 137 | # Match $(prefix)/$(lib) and $(prefix)/lib |
137 | sed -i -e 's,^libdir = \($(prefix)/.*lib\),libdir ?= \1,' \ | 138 | sed -i -e 's,^libdir = \($(prefix)/.*lib\),libdir ?= \1,' \ |
138 | -e 's,^perfexecdir = \(.*\),perfexecdir ?= \1,' \ | 139 | -e 's,^perfexecdir = \(.*\),perfexecdir ?= \1,' \ |
139 | -e 's,\.config-detected,$(OUTPUT)/config-detected,g' \ | 140 | -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \ |
140 | ${S}/tools/perf/config/Makefile | 141 | ${S}/tools/perf/config/Makefile |
141 | fi | 142 | fi |
142 | if [ -e "${S}/tools/perf/Makefile.perf" ]; then | 143 | if [ -e "${S}/tools/perf/Makefile.perf" ]; then |
143 | sed -i -e 's,\.config-detected,$(OUTPUT)/config-detected,g' \ | 144 | sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \ |
144 | ${S}/tools/perf/Makefile.perf | 145 | ${S}/tools/perf/Makefile.perf |
145 | fi | 146 | fi |
146 | if [ -e "${S}/tools/build/Makefile.build" ]; then | 147 | if [ -e "${S}/tools/build/Makefile.build" ]; then |
147 | sed -i -e 's,\.config-detected,$(OUTPUT)/config-detected,g' \ | 148 | sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \ |
148 | ${S}/tools/build/Makefile.build | 149 | ${S}/tools/build/Makefile.build |
149 | fi | 150 | fi |
150 | 151 | ||