Blame SOURCES/oprofile-ppc64le.patch

d5df0a
commit a265c549bff149f5e9064dca7d06b6689fb3d64e
d5df0a
Author: Maynard Johnson <maynardj@us.ibm.com>
d5df0a
Date:   Thu Jan 9 15:47:09 2014 -0600
d5df0a
d5df0a
    Enable oprofile for new ppc64le architecture
d5df0a
    
d5df0a
    Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>
d5df0a
d5df0a
diff --git a/configure.ac b/configure.ac
d5df0a
index 457145a..1e3a65f 100644
d5df0a
--- a/configure.ac
d5df0a
+++ b/configure.ac
d5df0a
@@ -184,7 +184,7 @@ AC_DEFINE_UNQUOTED(HAVE_PERF_EVENTS, $HAVE_PERF_EVENTS, [Kernel support for perf
d5df0a
 AC_CANONICAL_HOST
d5df0a
 if test "$HAVE_PERF_EVENTS" = "1"; then
d5df0a
 	PFM_LIB=
d5df0a
-	if test "$host_cpu" = "powerpc64"; then
d5df0a
+        if test "$host_cpu" = "powerpc64le" -o "$host_cpu" = "powerpc64"; then
d5df0a
 		AC_CHECK_HEADER(perfmon/pfmlib.h,,[AC_MSG_ERROR([pfmlib.h not found; usually provided in papi devel package])])
d5df0a
 		AC_CHECK_LIB(pfm,pfm_get_os_event_encoding, HAVE_LIBPFM3='0'; HAVE_LIBPFM='1', [
d5df0a
 			AC_CHECK_LIB(pfm, pfm_get_event_name, HAVE_LIBPFM3='1'; HAVE_LIBPFM='1',
d5df0a
diff --git a/libop/op_cpu_type.c b/libop/op_cpu_type.c
d5df0a
index 7d5262c..15c71ab 100644
d5df0a
--- a/libop/op_cpu_type.c
d5df0a
+++ b/libop/op_cpu_type.c
d5df0a
@@ -621,7 +621,8 @@ static op_cpu __get_cpu_type_alt_method(void)
d5df0a
 	    fnmatch("i?86", uname_info.machine, 0) == 0) {
d5df0a
 		return _get_x86_64_cpu_type();
d5df0a
 	}
d5df0a
-	if (strncmp(uname_info.machine, "ppc64", 5) == 0) {
d5df0a
+	if ((strncmp(uname_info.machine, "ppc64", 5) == 0) ||
d5df0a
+			(strncmp(uname_info.machine, "ppc64le", 7) == 0)) {
d5df0a
 		return _get_ppc64_cpu_type();
d5df0a
 	}
d5df0a
 	if (strncmp(uname_info.machine, "arm", 3) == 0 ||
d5df0a
diff --git a/libutil++/bfd_support.cpp b/libutil++/bfd_support.cpp
d5df0a
index 67edd09..4b744f8 100644
d5df0a
--- a/libutil++/bfd_support.cpp
d5df0a
+++ b/libutil++/bfd_support.cpp
d5df0a
@@ -634,9 +634,7 @@ void bfd_info::translate_debuginfo_syms(asymbol ** dbg_syms, long nr_dbg_syms)
d5df0a
 bool bfd_info::get_synth_symbols()
d5df0a
 {
d5df0a
 	extern const bfd_target bfd_elf64_powerpc_vec;
d5df0a
-	extern const bfd_target bfd_elf64_powerpcle_vec;
d5df0a
-	bool is_elf64_powerpc_target = (abfd->xvec == &bfd_elf64_powerpc_vec)
d5df0a
-		|| (abfd->xvec == &bfd_elf64_powerpcle_vec);
d5df0a
+	bool is_elf64_powerpc_target = (abfd->xvec == &bfd_elf64_powerpc_vec);
d5df0a
 
d5df0a
 	if (!is_elf64_powerpc_target)
d5df0a
 		return false;