summaryrefslogtreecommitdiffstats
path: root/meta
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:37:26 +0000
commitf1dc17dc3271049ebce5024ecb6a2eaa59a8480b (patch)
tree1325d4aa6f0daadf7b9173f387736a8523b82355 /meta
parent44f5f3f12848f256f83eee746752eba493984efe (diff)
downloadpoky-f1dc17dc3271049ebce5024ecb6a2eaa59a8480b.tar.gz
oprofile: fix cross compile on powerpc and add libpfm4 dep
Fixes [YOCTO #3717] (From OE-Core rev: 88959e42411a40b15fe8907da00a97a7732a9cc1) Signed-off-by: Matthew McClintock <msm@freescale.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/0001-fix-powerpc-cross-compiling.patch35
-rw-r--r--meta/recipes-kernel/oprofile/oprofile_0.9.8.bb7
2 files changed, 40 insertions, 2 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 @@
1Upstream-Status: Submitted
2
3From cd8aafe5ca48e8d809188df6e42f20efd5cbefd1 Mon Sep 17 00:00:00 2001
4From: Matthew McClintock <msm@freescale.com>
5Date: Tue, 5 Feb 2013 11:05:00 -0600
6Subject: [PATCH] fix powerpc cross compiling
7
8You can't determine the target for running on by running uname
9on the build machine. Use a better method instead.
10
11Signed-off-by: Matthew McClintock <msm@freescale.com>
12---
13 configure.ac | 4 ++--
14 1 file changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/configure.ac b/configure.ac
17index a9b1ee4..4b73cdd 100644
18--- a/configure.ac
19+++ b/configure.ac
20@@ -155,10 +155,10 @@ fi
21
22 AC_DEFINE_UNQUOTED(HAVE_PERF_EVENTS, $HAVE_PERF_EVENTS, [Kernel support for perf_events exists])
23
24+AC_CANONICAL_HOST
25 if test "$HAVE_PERF_EVENTS" = "1"; then
26 PFM_LIB=
27- arch="`uname -m`"
28- if test "$arch" = "ppc64" || test "$arch" = "ppc"; then
29+ if test "$host_cpu" = "powerpc"; then
30 AC_CHECK_HEADER(perfmon/pfmlib.h,,[AC_MSG_ERROR([pfmlib.h not found; usually provided in papi devel package])])
31 AC_CHECK_LIB(pfm,pfm_get_os_event_encoding, HAVE_LIBPFM3='0'; HAVE_LIBPFM='1', [
32 AC_CHECK_LIB(pfm, pfm_get_event_name, HAVE_LIBPFM3='1'; HAVE_LIBPFM='1',
33--
341.7.9.7
35
diff --git a/meta/recipes-kernel/oprofile/oprofile_0.9.8.bb b/meta/recipes-kernel/oprofile/oprofile_0.9.8.bb
index 60751638cb..79363a6017 100644
--- a/meta/recipes-kernel/oprofile/oprofile_0.9.8.bb
+++ b/meta/recipes-kernel/oprofile/oprofile_0.9.8.bb
@@ -1,15 +1,18 @@
1require oprofile.inc 1require oprofile.inc
2 2
3PR = "${INC_PR}.1" 3PR = "${INC_PR}.2"
4 4
5DEPENDS += "virtual/kernel" 5DEPENDS += "virtual/kernel"
6DEPENDS_append_powerpc = " libpfm4"
7DEPENDS_append_powerpc64 = " libpfm4"
6 8
7SRC_URI += "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ 9SRC_URI += "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
8 file://0001-Add-rmb-definition-for-AArch64-architecture.patch \ 10 file://0001-Add-rmb-definition-for-AArch64-architecture.patch \
9 file://0001-OProfile-doesn-t-build-for-32-bit-ppc-the-operf_util.patch \ 11 file://0001-OProfile-doesn-t-build-for-32-bit-ppc-the-operf_util.patch \
10 file://0001-Handle-early-perf_events-kernel-without-PERF_RECORD_.patch \ 12 file://0001-Handle-early-perf_events-kernel-without-PERF_RECORD_.patch \
11 file://0001-Fix-up-configure-to-handle-architectures-that-do-not.patch \ 13 file://0001-Fix-up-configure-to-handle-architectures-that-do-not.patch \
12 file://0001-Change-configure-to-look-for-libpfm4-function-first-.patch" 14 file://0001-Change-configure-to-look-for-libpfm4-function-first-.patch \
15 file://0001-fix-powerpc-cross-compiling.patch "
13 16
14SRC_URI[md5sum] = "6d127023af1dd1cf24e15411229f3cc8" 17SRC_URI[md5sum] = "6d127023af1dd1cf24e15411229f3cc8"
15SRC_URI[sha256sum] = "ab45900fa1a23e5d5badf3c0a55f26c17efe6e184efcf00b371433751fa761bc" 18SRC_URI[sha256sum] = "ab45900fa1a23e5d5badf3c0a55f26c17efe6e184efcf00b371433751fa761bc"