diff options
Diffstat (limited to 'meta/recipes-kernel/oprofile/oprofile/0001-fix-powerpc-cross-compiling.patch')
-rw-r--r-- | meta/recipes-kernel/oprofile/oprofile/0001-fix-powerpc-cross-compiling.patch | 35 |
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 @@ | |||
1 | Upstream-Status: Submitted | ||
2 | |||
3 | From cd8aafe5ca48e8d809188df6e42f20efd5cbefd1 Mon Sep 17 00:00:00 2001 | ||
4 | From: Matthew McClintock <msm@freescale.com> | ||
5 | Date: Tue, 5 Feb 2013 11:05:00 -0600 | ||
6 | Subject: [PATCH] fix powerpc cross compiling | ||
7 | |||
8 | You can't determine the target for running on by running uname | ||
9 | on the build machine. Use a better method instead. | ||
10 | |||
11 | Signed-off-by: Matthew McClintock <msm@freescale.com> | ||
12 | --- | ||
13 | configure.ac | 4 ++-- | ||
14 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
15 | |||
16 | diff --git a/configure.ac b/configure.ac | ||
17 | index 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 | -- | ||
34 | 1.7.9.7 | ||
35 | |||