Accepting request 1083801 from devel:tools

OBS-URL: https://build.opensuse.org/request/show/1083801
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/oprofile?expand=0&rev=56
This commit is contained in:
Dominique Leuenberger 2023-05-01 16:51:23 +00:00 committed by Git OBS Bridge
commit 294aa4522b
3 changed files with 52 additions and 1 deletions

42
oprofile-binutils.patch Normal file
View File

@ -0,0 +1,42 @@
From: Antoine Belvire <antoine.belvire@opensuse.org>
Subject: Fix linking on openSUSE Tumbleweed
Date: Sun Apr 30 17:19:41 UTC 2023
References: <none>
Upstream: no - not sure whether problem is generic or specific to Tumbleweed's binutils
Signed-Off-by: Antoine Belvire <antoine.belvire@opensuse.org>
--
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])])
]
)

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Sun Apr 30 17:19:41 UTC 2023 - Antoine Belvire <antoine.belvire@opensuse.org>
- 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 <dmueller@suse.com> Sat Jan 16 18:21:11 UTC 2021 - Dirk Müller <dmueller@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package oprofile # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -30,6 +30,7 @@ Source4: jvmpi.h
Source5: README-BEFORE-ADDING-PATCHES Source5: README-BEFORE-ADDING-PATCHES
Patch1: %{name}-no-libjvm-version.patch Patch1: %{name}-no-libjvm-version.patch
Patch2: %{name}-pfm-ppc.patch Patch2: %{name}-pfm-ppc.patch
Patch3: %{name}-binutils.patch
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: binutils-devel BuildRequires: binutils-devel
@ -41,6 +42,7 @@ BuildRequires: java-devel
BuildRequires: libICE-devel BuildRequires: libICE-devel
BuildRequires: libtool BuildRequires: libtool
BuildRequires: libxslt BuildRequires: libxslt
BuildRequires: libzstd-devel
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: popt-devel BuildRequires: popt-devel
BuildRequires: zlib-devel BuildRequires: zlib-devel