[packages/oprofile] - fix building with binutils 2.34 - rel 11
baggins
baggins at pld-linux.org
Mon Mar 23 23:11:22 CET 2020
commit 019ca8e08bf1d9617f471e4e03453936230a7e41
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Mon Mar 23 23:08:57 2020 +0100
- fix building with binutils 2.34
- rel 11
binutils-2.34.patch | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++
oprofile.spec | 4 +++-
2 files changed, 63 insertions(+), 1 deletion(-)
---
diff --git a/oprofile.spec b/oprofile.spec
index 39d0dfd..73e3fc3 100644
--- a/oprofile.spec
+++ b/oprofile.spec
@@ -10,12 +10,13 @@ Summary: System-wide profiler
Summary(pl.UTF-8): Ogólnosystemowy profiler
Name: oprofile
Version: 1.1.0
-Release: 10
+Release: 11
License: GPL v2 (oprofile), LGPL v2.1+ (libopagent)
Group: Applications/System
Source0: http://downloads.sourceforge.net/oprofile/%{name}-%{version}.tar.gz
# Source0-md5: 248c4c069f9476f427fa7195563f9867
Patch0: %{name}-c++.patch
+Patch1: binutils-2.34.patch
URL: http://oprofile.sourceforge.net/
# not used directly, but build fails without it
BuildRequires: autoconf >= 2.50
@@ -83,6 +84,7 @@ Statyczna biblioteka libopagent.
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
%build
%configure
diff --git a/binutils-2.34.patch b/binutils-2.34.patch
new file mode 100644
index 0000000..a842faf
--- /dev/null
+++ b/binutils-2.34.patch
@@ -0,0 +1,60 @@
+--- oprofile-1.1.0/libutil++/bfd_support.cpp.orig 2015-07-07 16:04:37.000000000 +0200
++++ oprofile-1.1.0/libutil++/bfd_support.cpp 2020-03-23 23:04:37.666971686 +0100
+@@ -137,7 +137,7 @@
+ }
+ }
+
+- bfd_size_type buildid_sect_size = bfd_section_size(ibfd, sect);
++ bfd_size_type buildid_sect_size = bfd_section_size(sect);
+ char * contents = (char *) xmalloc(buildid_sect_size);
+ errno = 0;
+ if (!bfd_get_section_contents(ibfd, sect,
+@@ -188,7 +188,7 @@
+ if (sect == NULL)
+ return false;
+
+- bfd_size_type debuglink_size = bfd_section_size(ibfd, sect);
++ bfd_size_type debuglink_size = bfd_section_size(sect);
+ char * contents = (char *) xmalloc(debuglink_size);
+ cverb << vbfd
+ << ".gnu_debuglink section has size " << debuglink_size << endl;
+@@ -346,7 +346,7 @@
+ // first restrict the search on a sensible range of vma, 16 is
+ // an intuitive value based on epilog code look
+ size_t max_search = 16;
+- size_t section_size = bfd_section_size(abfd, section);
++ size_t section_size = bfd_section_size(section);
+ if (pc + max_search > section_size)
+ max_search = section_size - pc;
+
+@@ -819,10 +819,10 @@
+ else
+ pc = (sym.value() + offset) - sym.filepos();
+
+- if ((bfd_get_section_flags(abfd, section) & SEC_ALLOC) == 0)
++ if ((bfd_section_flags(section) & SEC_ALLOC) == 0)
+ goto fail;
+
+- if (pc >= bfd_section_size(abfd, section))
++ if (pc >= bfd_section_size(section))
+ goto fail;
+
+ ret = bfd_find_nearest_line(abfd, section, syms, pc, &cfilename,
+--- oprofile-1.1.0/opjitconv/create_bfd.c.orig 2020-03-23 23:06:05.216972844 +0100
++++ oprofile-1.1.0/opjitconv/create_bfd.c 2020-03-23 23:07:01.340306932 +0100
+@@ -86,12 +86,12 @@
+ bfd_perror("bfd_make_section");
+ goto error;
+ }
+- bfd_set_section_vma(abfd, section, vma);
+- if (bfd_set_section_size(abfd, section, size) == FALSE) {
++ bfd_set_section_vma(section, vma);
++ if (bfd_set_section_size(section, size) == FALSE) {
+ bfd_perror("bfd_set_section_size");
+ goto error;
+ }
+- if (bfd_set_section_flags(abfd, section, flags) == FALSE) {
++ if (bfd_set_section_flags(section, flags) == FALSE) {
+ bfd_perror("bfd_set_section_flags");
+ goto error;
+ }
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/oprofile.git/commitdiff/019ca8e08bf1d9617f471e4e03453936230a7e41
More information about the pld-cvs-commit
mailing list