diff --git a/oprofile-pfm-ppc.patch b/oprofile-pfm-ppc.patch new file mode 100644 index 0000000..b0bf29e --- /dev/null +++ b/oprofile-pfm-ppc.patch @@ -0,0 +1,19 @@ +From: Tony Jones +Subject: enable pfm detection for 32bit ppc +Upstream: no + +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/configure.ac ++++ b/configure.ac +@@ -104,7 +104,7 @@ AC_DEFINE_UNQUOTED(HAVE_PERF_EVENTS, $HA + if test "$HAVE_PERF_EVENTS" = "1"; then + PFM_LIB= + arch="`uname -m`" +- if test "$arch" = "ppc64"; then ++ if test "$arch" = "ppc64" || test "$arch" = "ppc"; then + AC_CHECK_HEADER(perfmon/pfmlib.h,,[AC_MSG_ERROR([pfmlib.h not found; usually provided in papi devel package])]) + AC_CHECK_LIB(pfm,pfm_get_event_name, HAVE_LIBPFM3='1'; HAVE_LIBPFM='1', [ + AC_CHECK_LIB(pfm,pfm_get_os_event_encoding, HAVE_LIBPFM3='0'; HAVE_LIBPFM='1', diff --git a/oprofile.changes b/oprofile.changes index c661daa..3195e68 100644 --- a/oprofile.changes +++ b/oprofile.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jan 3 20:14:41 UTC 2013 - tonyj@suse.com + +- Add dependancy on libpfm 4.3 for powerpc. +- Fix configure for 32bit powerpc + ------------------------------------------------------------------- Mon Dec 10 20:37:17 UTC 2012 - tonyj@suse.com diff --git a/oprofile.spec b/oprofile.spec index f65cc94..d10b93c 100644 --- a/oprofile.spec +++ b/oprofile.spec @@ -1,7 +1,7 @@ # # spec file for package oprofile # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,6 +25,9 @@ BuildRequires: libxslt BuildRequires: popt-devel BuildRequires: qt-devel BuildRequires: update-desktop-files +%ifarch ppc ppc64 +BuildRequires: libpfm-devel >= 4.3.0 +%endif Url: http://oprofile.sourceforge.net/ PreReq: /usr/sbin/groupadd /usr/sbin/useradd Version: 0.9.8 @@ -41,6 +44,7 @@ Source4: jvmpi.h Source5: README-BEFORE-ADDING-PATCHES Patch1: %{name}-compressed-kernel.patch Patch2: %{name}-no-libjvm-version.patch +Patch3: %{name}-pfm-ppc.patch %description OProfile is a system-wide profiler for Linux systems, capable of @@ -93,6 +97,7 @@ from supported virtual machines. %setup -q %patch1 -p1 %patch2 -p1 +%patch3 -p1 mkdir -p java/include # copy files necessary to build Java agent libraries # libjvmpi_oprofile.so and libjvmti_oprofile.so