-
Notifications
You must be signed in to change notification settings - Fork 0
/
oprofile-binutils.patch
42 lines (41 loc) · 2.03 KB
/
oprofile-binutils.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From: Antoine Belvire <[email protected]>
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 <[email protected]>
--
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])])
]
)