]> code.ossystems Code Review - openembedded-core.git/commitdiff
perf: fix undefined pr_* routines
authorBruce Ashfield <bruce.ashfield@windriver.com>
Wed, 1 Oct 2014 04:43:36 +0000 (00:43 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 1 Oct 2014 08:05:02 +0000 (09:05 +0100)
When cross compiling libunwind support for ARM a missing debug include means
that pr* macros are not expanded, and hence link failures on the undefined
functions.

Since we must be compatible with many versions of the kernel and perf, we
sed the proper include into the files, while the permanent fix goes upstream
to the mainline kernel.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-kernel/perf/perf.bb

index ea7571aa8e29b9a2b073796fd4e89815b7679213..3771cdb3e9ddcd781aa95f5b4d92e16c06d09037 100644 (file)
@@ -145,9 +145,14 @@ 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
-    # 3.17-rc1+ has a include issue for powerpc. Temporarily sed in the appropriate include
-    if [ -e "${S}/tools/perf/arch/powerpc/util/skip-callchain-idx.c" ]; then
-        sed -i 's,#include "util/callchain.h",#include "util/callchain.h"\n#include "util/debug.h",' ${S}/tools/perf/arch/powerpc/util/skip-callchain-idx.c
+
+    # 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
+        sed -i 's,#include "util/callchain.h",#include "util/callchain.h"\n#include "util/debug.h",' ${S}/tools/perf/arch/$ARCH/util/skip-callchain-idx.c
+    fi
+    if [ -e "${S}/tools/perf/arch/arm/util/unwind-libunwind.c" ] && [ -e "${S}/tools/perf/arch/arm/tests/dwarf-unwind.c" ]; then
+        sed -i 's,#include "tests/tests.h",#include "tests/tests.h"\n#include "util/debug.h",' ${S}/tools/perf/arch/arm/tests/dwarf-unwind.c
+        sed -i 's,#include "perf_regs.h",#include "perf_regs.h"\n#include "util/debug.h",' ${S}/tools/perf/arch/arm/util/unwind-libunwind.c
     fi
 }