summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/oprofile/files')
-rw-r--r--dev-util/oprofile/files/oprofile-0.9.9-gcc-4.9-non-ppc.patch36
-rw-r--r--dev-util/oprofile/files/oprofile-0.9.9-gcc-4.9-unused.patch47
-rw-r--r--dev-util/oprofile/files/oprofile-1.0.0-athlon.patch20
-rw-r--r--dev-util/oprofile/files/oprofile-1.0.0-opjitconv-open.patch11
4 files changed, 114 insertions, 0 deletions
diff --git a/dev-util/oprofile/files/oprofile-0.9.9-gcc-4.9-non-ppc.patch b/dev-util/oprofile/files/oprofile-0.9.9-gcc-4.9-non-ppc.patch
new file mode 100644
index 000000000000..423c703f7ffb
--- /dev/null
+++ b/dev-util/oprofile/files/oprofile-0.9.9-gcc-4.9-non-ppc.patch
@@ -0,0 +1,36 @@
+Backported from 1.0.0:
+======================================================================
+commit 008e470a9b8751de0a3745e511cbc05b68759688
+Author: Aaro Koskinen <aaro.koskinen@iki.fi>
+Date: Mon May 12 08:28:46 2014 -0500
+
+ configure: fix test-for-synth check with GCC 4.9.0
+
+ With GCC 4.9.0 oprofile 0.9.9 build fails on non-PPC platfroms because
+ the "test-for-synth" configure check result is incorrect: There is a NULL
+ pointer dereference in the test program, so the compiler seems to optimize
+ the rest of the code away, and the test will always succeed regardless
+ whether powerpc_elf64_vec/bfd_elf64_powerpc_vec are present or not.
+ Fix by allocating the referred struct statically.
+
+ While at it, also include stdio.h to avoid a compiler warning.
+
+ Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
+
+diff --git a/m4/binutils.m4 b/m4/binutils.m4
+index 25fb15a..d7948c1 100644
+--- a/m4/binutils.m4
++++ b/m4/binutils.m4
+@@ -27,8 +27,10 @@ if test "$OS" = "Linux"; then
+ AC_MSG_CHECKING([whether bfd_get_synthetic_symtab() exists in BFD library])
+ rm -f test-for-synth
+ AC_LANG_CONFTEST(
+- [AC_LANG_PROGRAM([[#include <bfd.h>]],
+- [[asymbol * synthsyms; bfd * ibfd = 0;
++ [AC_LANG_PROGRAM([[#include <bfd.h>]
++ [#include <stdio.h>]
++ [static bfd _ibfd;]],
++ [[asymbol * synthsyms; bfd * ibfd = &_ibfd;
+ long synth_count = bfd_get_synthetic_symtab(ibfd, 0, 0, 0, 0, &synthsyms);
+ extern const bfd_target bfd_elf64_powerpc_vec;
+ extern const bfd_target bfd_elf64_powerpcle_vec;
diff --git a/dev-util/oprofile/files/oprofile-0.9.9-gcc-4.9-unused.patch b/dev-util/oprofile/files/oprofile-0.9.9-gcc-4.9-unused.patch
new file mode 100644
index 000000000000..5c541a053a72
--- /dev/null
+++ b/dev-util/oprofile/files/oprofile-0.9.9-gcc-4.9-unused.patch
@@ -0,0 +1,47 @@
+commit 98f57a6c0e32bc6080a50e1cdd769b9ff78108bc
+Author: William Cohen <wcohen@redhat.com>
+Date: Tue Jun 10 09:56:55 2014 -0500
+
+ Remove unused functions causing errors in recent gcc
+
+ The Fedora rawhide compiler is now stricter and will treat the
+ warnings for unused functions as errors and stop the compile. This patch
+ removes two unused functions in the code.
+
+ Signed-off-by: William Cohen <wcohen@redhat.com>
+
+diff --git a/libpp/callgraph_container.cpp b/libpp/callgraph_container.cpp
+index 1d1c95f..c5bc272 100644
+--- a/libpp/callgraph_container.cpp
++++ b/libpp/callgraph_container.cpp
+@@ -36,13 +36,6 @@ using namespace std;
+
+ namespace {
+
+-bool operator==(cg_symbol const & lhs, cg_symbol const & rhs)
+-{
+- less_symbol cmp_symb;
+- return !cmp_symb(lhs, rhs) && !cmp_symb(rhs, lhs);
+-}
+-
+-
+ // we store {caller,callee} inside a single u64
+ odb_key_t caller_to_key(u32 value)
+ {
+diff --git a/libpp/xml_utils.cpp b/libpp/xml_utils.cpp
+index 5f1a3a1..3de41e5 100644
+--- a/libpp/xml_utils.cpp
++++ b/libpp/xml_utils.cpp
+@@ -101,12 +101,6 @@ bool has_separated_thread_info()
+ }
+
+
+-string get_cpu_num(size_t pclass)
+-{
+- return classes.v[pclass].ptemplate.cpu;
+-}
+-
+-
+ }; // anonymous namespace
+
+ xml_utils::xml_utils(format_output::xml_formatter * xo,
diff --git a/dev-util/oprofile/files/oprofile-1.0.0-athlon.patch b/dev-util/oprofile/files/oprofile-1.0.0-athlon.patch
new file mode 100644
index 000000000000..5916271b3a00
--- /dev/null
+++ b/dev-util/oprofile/files/oprofile-1.0.0-athlon.patch
@@ -0,0 +1,20 @@
+Fix AMD Athlon CPU family recognition.
+See upstream bug 275 for details:
+https://sourceforge.net/p/oprofile/bugs/275/
+--- oprofile-1.0.0/libop/op_cpu_type.c.orig 2014-09-12 18:39:47.000000000 +0400
++++ oprofile-1.0.0/libop/op_cpu_type.c 2014-11-30 18:29:00.328342552 +0300
+@@ -538,10 +538,13 @@
+ family = cpu_family(eax);
+
+ /* These family does not exist in the past.*/
+- if (family < 0x0f || family == 0x13)
++ if ((family < 0x0f && family != 0x06) || family == 0x13)
+ return ret;
+
+ switch (family) {
++ case 0x6:
++ ret = op_get_cpu_number("i386/athlon");
++ break;
+ case 0x0f:
+ ret = op_get_cpu_number("x86-64/hammer");
+ break;
diff --git a/dev-util/oprofile/files/oprofile-1.0.0-opjitconv-open.patch b/dev-util/oprofile/files/oprofile-1.0.0-opjitconv-open.patch
new file mode 100644
index 000000000000..2943a074f5ef
--- /dev/null
+++ b/dev-util/oprofile/files/oprofile-1.0.0-opjitconv-open.patch
@@ -0,0 +1,11 @@
+--- a/opjitconv/opjitconv.c
++++ b/opjitconv/opjitconv.c
+@@ -216,7 +216,7 @@
+ int file_locked = 0;
+ unsigned int usecs_waited = 0;
+ int rc = OP_JIT_CONV_OK;
+- int fd = open(dumpfile, S_IRUSR);
++ int fd = open(dumpfile, O_RDONLY);
+ if (fd < 0) {
+ perror("opjitconv failed to open JIT dumpfile");
+ return OP_JIT_CONV_FAIL;