summaryrefslogtreecommitdiff
path: root/package/oprofile
diff options
context:
space:
mode:
authorWaldemar Brodkorb <mail@waldemar-brodkorb.de>2013-11-06 21:21:28 +0100
committerWaldemar Brodkorb <mail@waldemar-brodkorb.de>2013-11-06 21:21:28 +0100
commite82d685f38adbc0e50cf47cd0e4893c2e6633d83 (patch)
tree3df924eaa62bc3c85dbab0d51cfd7d9d2f862ac0 /package/oprofile
parentd2081213352e456f7596f22e0b37b682204c4cfe (diff)
forgot to add patches dir
Diffstat (limited to 'package/oprofile')
-rw-r--r--package/oprofile/Makefile4
-rw-r--r--package/oprofile/patches/patch-libop_op_cpu_type_c42
2 files changed, 44 insertions, 2 deletions
diff --git a/package/oprofile/Makefile b/package/oprofile/Makefile
index d21f0a635..2128a14e7 100644
--- a/package/oprofile/Makefile
+++ b/package/oprofile/Makefile
@@ -5,11 +5,11 @@ include $(TOPDIR)/rules.mk
PKG_NAME:= oprofile
PKG_VERSION:= 0.9.9
-PKG_RELEASE:= 2
+PKG_RELEASE:= 3
PKG_MD5SUM:= 00aec1287da2dfffda17a9b1c0a01868
PKG_DESCR:= system-wide profiles
PKG_SECTION:= debug
-PKG_DEPENDS:= libpopt kmod-oprofile libbfd libstdcxx
+PKG_DEPENDS:= libpopt kmod-oprofile libbfd libstdcxx libgcc
PKG_BUILDDEP:= popt binutils
PKG_URL:= http://oprofile.sourceforge.net/
PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=oprofile/}
diff --git a/package/oprofile/patches/patch-libop_op_cpu_type_c b/package/oprofile/patches/patch-libop_op_cpu_type_c
new file mode 100644
index 000000000..6064fc5e7
--- /dev/null
+++ b/package/oprofile/patches/patch-libop_op_cpu_type_c
@@ -0,0 +1,42 @@
+--- oprofile-0.9.9.orig/libop/op_cpu_type.c 2013-07-29 17:55:07.000000000 +0200
++++ oprofile-0.9.9/libop/op_cpu_type.c 2013-11-05 20:55:54.000000000 +0100
+@@ -23,9 +23,17 @@
+ #include <elf.h>
+ #include <link.h>
+
++#include "config.h"
+ #include "op_cpu_type.h"
+ #include "op_hw_specific.h"
+
++
++/* A macro to be used for ppc64 architecture-specific code. The '__powerpc__' macro
++ * is defined for both ppc64 and ppc32 architectures, so we must further qualify by
++ * including the 'HAVE_LIBPFM' macro, since that macro will be defined only for ppc64.
++ */
++#define PPC64_ARCH (HAVE_LIBPFM) && ((defined(__powerpc__) || defined(__powerpc64__)))
++
+ struct cpu_descr {
+ char const * pretty;
+ char const * name;
+@@ -176,6 +184,7 @@ static char * _get_cpuinfo_cpu_type(char
+ return _get_cpuinfo_cpu_type_line(buf, len, prefix, 1);
+ }
+
++#if PPC64_ARCH
+ // The aux vector stuff below is currently only used by ppc64 arch
+ static ElfW(auxv_t) * auxv_buf = NULL;
+
+@@ -313,6 +322,13 @@ static op_cpu _get_ppc64_cpu_type(void)
+ return cpu_type;
+ }
+
++#else
++static op_cpu _get_ppc64_cpu_type(void)
++{
++ return CPU_NO_GOOD;
++}
++#endif
++
+ static op_cpu _get_arm_cpu_type(void)
+ {
+ unsigned long cpuid, vendorid;