[OE-core] [PATCH 4/5] perf: fix build (and feature tests) for 4.1-rcX

Bruce Ashfield bruce.ashfield at windriver.com
Fri May 1 01:34:19 UTC 2015


The way that perf detects features has changed/moved via commit e6c76d620
[perf build: Move feature checks code under tools/build].

This code movement resulted in the definition of CC being dropped, and
in turn the passing of --sysroot not part of the build.

This results in feature tests failing with errors such as:

  In file included from test-pthread-attr-setaffinity-np.c:1:0:
  sysroots/x86_64-linux/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/4.9.2/include/stdint.h:9:26:
  fatal error: stdint.h: No such file or directory
  # include_next <stdint.h>
                          ^
  compilation terminated.

While the fix is going upstream, we can modify the perf recipe to add
the definition of CC into the Makefile, and we'll continue to work on
patched and unpatched kernels.

Upstream-status: Pending

Signed-off-by: Bruce Ashfield <bruce.ashfield at windriver.com>
---
 meta/recipes-kernel/perf/perf.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 420fe6b57aba..eb273740ee10 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -150,6 +150,9 @@ do_configure_prepend () {
     if [ -e "${S}/tools/perf/config/feature-checks/Makefile" ]; then
         sed -i 's,CC := $(CROSS_COMPILE)gcc -MD,CC += -MD,' ${S}/tools/perf/config/feature-checks/Makefile
     fi
+    if [ -e "${S}/tools/build/Makefile.feature" ]; then
+        sed -i 's,CFLAGS=,CC="\$(CC)" CFLAGS=,' ${S}/tools/build/Makefile.feature
+    fi
 
     # 3.17-rc1+ has a include issue for arm/powerpc. Temporarily sed in the appropriate include
     if [ -e "${S}/tools/perf/arch/$ARCH/util/skip-callchain-idx.c" ]; then
-- 
2.1.0




More information about the Openembedded-core mailing list