diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-25 14:37:58 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-08-09 16:37:44 -0700 |
commit | ea9016b60b47138bc58d84a06954b44527b20a19 (patch) | |
tree | 8bfce3699ce0ac90a192405253fbb32b9436583a | |
parent | 3b732f01c9c28454a29da95761a7e0a6a659547d (diff) | |
download | 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>
-rw-r--r-- | meta/recipes-kernel/perf/perf.bb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb index eb273740ee..f8e80d0e48 100644 --- a/meta/recipes-kernel/perf/perf.bb +++ b/meta/recipes-kernel/perf/perf.bb | |||
@@ -132,12 +132,27 @@ do_configure_prepend () { | |||
132 | # 64 bit build (and library) are not exected. To ensure that libraries are | 132 | # 64 bit build (and library) are not exected. To ensure that libraries are |
133 | # installed to the correct location, we can use the weak assignment in the | 133 | # installed to the correct location, we can use the weak assignment in the |
134 | # config/Makefile. | 134 | # config/Makefile. |
135 | # | ||
136 | # Also need to relocate .config-detected to $(OUTPUT)/config-detected | ||
137 | # as two builds (e.g. perf and lib32-perf from mutlilib can conflict | ||
138 | # with each other if its in the shared source directory | ||
139 | # | ||
135 | if [ -e "${S}/tools/perf/config/Makefile" ]; then | 140 | if [ -e "${S}/tools/perf/config/Makefile" ]; then |
136 | # Match $(prefix)/$(lib) and $(prefix)/lib | 141 | # Match $(prefix)/$(lib) and $(prefix)/lib |
137 | sed -i -e 's,^libdir = \($(prefix)/.*lib\),libdir ?= \1,' \ | 142 | sed -i -e 's,^libdir = \($(prefix)/.*lib\),libdir ?= \1,' \ |
138 | -e 's,^perfexecdir = \(.*\),perfexecdir ?= \1,' \ | 143 | -e 's,^perfexecdir = \(.*\),perfexecdir ?= \1,' \ |
144 | -e 's,\.config-detected,$(OUTPUT)/config-detected,g' \ | ||
139 | ${S}/tools/perf/config/Makefile | 145 | ${S}/tools/perf/config/Makefile |
140 | fi | 146 | fi |
147 | if [ -e "${S}/tools/perf/Makefile.perf" ]; then | ||
148 | sed -i -e 's,\.config-detected,$(OUTPUT)/config-detected,g' \ | ||
149 | ${S}/tools/perf/Makefile.perf | ||
150 | fi | ||
151 | if [ -e "${S}/tools/build/Makefile.build" ]; then | ||
152 | sed -i -e 's,\.config-detected,$(OUTPUT)/config-detected,g' \ | ||
153 | ${S}/tools/build/Makefile.build | ||
154 | fi | ||
155 | |||
141 | # We need to ensure the --sysroot option in CC is preserved | 156 | # We need to ensure the --sysroot option in CC is preserved |
142 | if [ -e "${S}/tools/perf/Makefile.perf" ]; then | 157 | if [ -e "${S}/tools/perf/Makefile.perf" ]; then |
143 | sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/perf/Makefile.perf | 158 | sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/perf/Makefile.perf |