]> code.ossystems Code Review - openembedded-core.git/commitdiff
perf: Fix config file conflict with 4.1 kernels
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 25 Jul 2015 13:37:58 +0000 (14:37 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 9 Aug 2015 23:36:55 +0000 (16:36 -0700)
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)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-kernel/perf/perf.bb

index eb273740ee10c345ff6f7dab0b63320949e18140..f8e80d0e4886be551087bca86b2ed324260161b1 100644 (file)
@@ -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