diff --git a/oprofile-binutils.patch b/oprofile-binutils.patch new file mode 100644 index 0000000..19dabcb --- /dev/null +++ b/oprofile-binutils.patch @@ -0,0 +1,42 @@ +From: Antoine Belvire +Subject: Fix linking on openSUSE Tumbleweed +Date: Sun Apr 30 17:19:41 UTC 2023 +References: +Upstream: no - not sure whether problem is generic or specific to Tumbleweed's binutils +Signed-Off-by: Antoine Belvire +-- +diff -up oprofile-1.4.0/configure.ac.orig oprofile-1.4.0/configure.ac +--- oprofile-1.4.0/configure.ac.orig 2023-04-30 19:27:30.316426363 +0200 ++++ oprofile-1.4.0/configure.ac 2023-04-30 19:56:37.828498811 +0200 +@@ -333,7 +333,7 @@ AX_CHECK_DOCBOOK + dnl finally restore the original libs setting + LIBS="$ORIG_SAVE_LIBS" + LIBERTY_LIBS="-liberty $DL_LIB $INTL_LIB" +-BFD_LIBS="-lbfd -liberty $DL_LIB $INTL_LIB $Z_LIB" ++BFD_LIBS="-lbfd -liberty $DL_LIB $INTL_LIB $Z_LIB $SFRAME_LIB" + POPT_LIBS="-lpopt" + AC_SUBST(LIBERTY_LIBS) + AC_SUBST(BFD_LIBS) +diff -up oprofile-1.4.0/m4/binutils.m4.orig oprofile-1.4.0/m4/binutils.m4 +--- oprofile-1.4.0/m4/binutils.m4.orig 2023-04-30 18:19:47.848257943 +0200 ++++ oprofile-1.4.0/m4/binutils.m4 2023-04-30 21:40:11.412756411 +0200 +@@ -10,12 +10,14 @@ AC_CHECK_FUNCS(xmemdup) + AC_CHECK_LIB(dl, dlopen, LIBS="$LIBS -ldl"; DL_LIB="-ldl", DL_LIB="") + AC_CHECK_LIB(intl, main, LIBS="$LIBS -lintl"; INTL_LIB="-lintl", INTL_LIB="") + +-AC_CHECK_LIB(bfd, bfd_openr, LIBS="-lbfd $LIBS"; Z_LIB="", ++AC_CHECK_LIB(bfd, bfd_openr, LIBS="-lbfd $LIBS"; Z_LIB=""; SFRAME_LIB="", + [AC_CHECK_LIB(z, compress, +-dnl Use a different bfd function here so as not to use cached result from above +- [AC_CHECK_LIB(bfd, bfd_fdopenr, LIBS="-lbfd -lz $LIBS"; Z_LIB="-lz", +- [AC_MSG_ERROR([bfd library not found])], -lz) +- ], ++dnl Use different bfd functions below so as not to use cached results from above ++ [AC_CHECK_LIB(bfd, bfd_fdopenr, LIBS="-lbfd -lz $LIBS"; Z_LIB="-lz"; SFRAME_LIB="", ++ [AC_CHECK_LIB(bfd, bfd_openstreamr, LIBS="-lbfd -lz -lsframe -lzstd $LIBS"; Z_LIB="-lz"; SFRAME_LIB="-lsframe -lzstd", ++ [AC_MSG_ERROR([bfd library not found])], -lz -lsframe -lzstd) ++ ], -lz) ++ ], + [AC_MSG_ERROR([libz library not found; required by libbfd])]) + ] + ) diff --git a/oprofile.changes b/oprofile.changes index 396fbd1..a2a68f5 100644 --- a/oprofile.changes +++ b/oprofile.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sun Apr 30 17:19:41 UTC 2023 - Antoine Belvire + +- Fix linking on Tumbleweed: + * Add oprofile-binutils.patch. + * Add build dependency on libzstd-devel. + ------------------------------------------------------------------- Sat Jan 16 18:21:11 UTC 2021 - Dirk Müller diff --git a/oprofile.spec b/oprofile.spec index 96a0ee8..e7a2bb4 100644 --- a/oprofile.spec +++ b/oprofile.spec @@ -1,7 +1,7 @@ # # spec file for package oprofile # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -30,6 +30,7 @@ Source4: jvmpi.h Source5: README-BEFORE-ADDING-PATCHES Patch1: %{name}-no-libjvm-version.patch Patch2: %{name}-pfm-ppc.patch +Patch3: %{name}-binutils.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: binutils-devel @@ -41,6 +42,7 @@ BuildRequires: java-devel BuildRequires: libICE-devel BuildRequires: libtool BuildRequires: libxslt +BuildRequires: libzstd-devel BuildRequires: pkgconfig BuildRequires: popt-devel BuildRequires: zlib-devel