Blame SOURCES/oprofile-ppc64le.patch

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