[packages/oprofile] fix perf events support detection with gcc 14
atler
atler at pld-linux.org
Mon Aug 12 15:34:34 CEST 2024
commit e6dab50f7fcf7b8fea6e3649e04c860bceab4676
Author: Jan Palus <atler at pld-linux.org>
Date: Mon Aug 12 15:31:38 2024 +0200
fix perf events support detection with gcc 14
gcc14.patch | 11 +++++++++++
oprofile.spec | 8 ++++++++
2 files changed, 19 insertions(+)
---
diff --git a/oprofile.spec b/oprofile.spec
index a96973a..36edcc7 100644
--- a/oprofile.spec
+++ b/oprofile.spec
@@ -16,11 +16,14 @@ License: GPL v2 (oprofile), LGPL v2.1+ (libopagent)
Group: Applications/System
Source0: http://downloads.sourceforge.net/oprofile/%{name}-%{version}.tar.gz
# Source0-md5: ac0ff685ec9735e30d6a4d19de0efed7
+Patch0: gcc14.patch
URL: http://oprofile.sourceforge.net/
# not used directly, but build fails without it
BuildRequires: autoconf >= 2.50
+BuildRequires: automake
BuildRequires: binutils-devel
BuildRequires: libstdc++-devel
+BuildRequires: libtool
BuildRequires: linux-libc-headers >= 7:2.6.31
BuildRequires: pkgconfig
BuildRequires: popt-devel
@@ -83,8 +86,13 @@ Statyczna biblioteka libopagent.
%prep
%setup -q
+%patch0 -p1
%build
+%{__libtoolize}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__automake}
%configure
%{__make}
diff --git a/gcc14.patch b/gcc14.patch
new file mode 100644
index 0000000..1d251c7
--- /dev/null
+++ b/gcc14.patch
@@ -0,0 +1,11 @@
+--- oprofile-1.4.0/configure.ac.orig 2020-07-20 17:26:39.000000000 +0200
++++ oprofile-1.4.0/configure.ac 2024-08-12 15:29:17.657833036 +0200
+@@ -118,6 +118,8 @@
+ #include <asm/unistd.h>
+ #include <sys/types.h>
+ #include <string.h>
++ #include <sys/syscall.h>
++ #include <unistd.h>
+ ]],
+ [[struct perf_event_attr attr;
+ pid_t pid;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/oprofile.git/commitdiff/e6dab50f7fcf7b8fea6e3649e04c860bceab4676
More information about the pld-cvs-commit
mailing list