aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/oprofile/oprofile
diff options
context:
space:
mode:
authorMatthew McClintock <msm@freescale.com>2013-02-05 11:46:48 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-02-06 09:35:04 +0000
commit88959e42411a40b15fe8907da00a97a7732a9cc1 (patch)
tree2108d8511ec624b57a92c6577ce37abcb930f3db /meta/recipes-kernel/oprofile/oprofile
parent52c94978992d9084d685d4999064a8cee35220d1 (diff)
downloadopenembedded-core-contrib-88959e42411a40b15fe8907da00a97a7732a9cc1.tar.gz
oprofile: fix cross compile on powerpc and add libpfm4 dep
Fixes [YOCTO #3717] Signed-off-by: Matthew McClintock <msm@freescale.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-kernel/oprofile/oprofile')
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/0001-fix-powerpc-cross-compiling.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/meta/recipes-kernel/oprofile/oprofile/0001-fix-powerpc-cross-compiling.patch b/meta/recipes-kernel/oprofile/oprofile/0001-fix-powerpc-cross-compiling.patch
new file mode 100644
index 0000000000..d4dffb18d0
--- /dev/null
+++ b/meta/recipes-kernel/oprofile/oprofile/0001-fix-powerpc-cross-compiling.patch
@@ -0,0 +1,35 @@
+Upstream-Status: Submitted
+
+From cd8aafe5ca48e8d809188df6e42f20efd5cbefd1 Mon Sep 17 00:00:00 2001
+From: Matthew McClintock <msm@freescale.com>
+Date: Tue, 5 Feb 2013 11:05:00 -0600
+Subject: [PATCH] fix powerpc cross compiling
+
+You can't determine the target for running on by running uname
+on the build machine. Use a better method instead.
+
+Signed-off-by: Matthew McClintock <msm@freescale.com>
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index a9b1ee4..4b73cdd 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -155,10 +155,10 @@ fi
+
+ AC_DEFINE_UNQUOTED(HAVE_PERF_EVENTS, $HAVE_PERF_EVENTS, [Kernel support for perf_events exists])
+
++AC_CANONICAL_HOST
+ if test "$HAVE_PERF_EVENTS" = "1"; then
+ PFM_LIB=
+- arch="`uname -m`"
+- if test "$arch" = "ppc64" || test "$arch" = "ppc"; then
++ if test "$host_cpu" = "powerpc"; then
+ AC_CHECK_HEADER(perfmon/pfmlib.h,,[AC_MSG_ERROR([pfmlib.h not found; usually provided in papi devel package])])
+ AC_CHECK_LIB(pfm,pfm_get_os_event_encoding, HAVE_LIBPFM3='0'; HAVE_LIBPFM='1', [
+ AC_CHECK_LIB(pfm, pfm_get_event_name, HAVE_LIBPFM3='1'; HAVE_LIBPFM='1',
+--
+1.7.9.7
+