1 |
commit: 5de9423fbf17e94be54f48d9b5c613c2b8a7fb20 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 13 05:48:23 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 13 05:49:04 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5de9423f |
7 |
|
8 |
dev-util/apitrace: fix build with glibc-2.34 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/812155 |
11 |
Thanks-to: Mihai Moldovan <ionic <AT> ionic.de> |
12 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
13 |
|
14 |
dev-util/apitrace/apitrace-9.0-r3.ebuild | 3 ++- |
15 |
.../apitrace-9.0-libc-dlopen-glibc-2.34.patch | 29 ++++++++++++++++++++++ |
16 |
2 files changed, 31 insertions(+), 1 deletion(-) |
17 |
|
18 |
diff --git a/dev-util/apitrace/apitrace-9.0-r3.ebuild b/dev-util/apitrace/apitrace-9.0-r3.ebuild |
19 |
index 7c0a0190acac..a150636da799 100644 |
20 |
--- a/dev-util/apitrace/apitrace-9.0-r3.ebuild |
21 |
+++ b/dev-util/apitrace/apitrace-9.0-r3.ebuild |
22 |
@@ -1,4 +1,4 @@ |
23 |
-# Copyright 1999-2021 Gentoo Authors |
24 |
+# Copyright 1999-2022 Gentoo Authors |
25 |
# Distributed under the terms of the GNU General Public License v2 |
26 |
|
27 |
EAPI=7 |
28 |
@@ -40,6 +40,7 @@ PATCHES=( |
29 |
# TODO: upstream |
30 |
"${FILESDIR}"/${P}-disable-multiarch.patch |
31 |
"${FILESDIR}"/${P}-brotli-unbundle.patch |
32 |
+ "${FILESDIR}"/${P}-libc-dlopen-glibc-2.34.patch |
33 |
) |
34 |
|
35 |
src_prepare() { |
36 |
|
37 |
diff --git a/dev-util/apitrace/files/apitrace-9.0-libc-dlopen-glibc-2.34.patch b/dev-util/apitrace/files/apitrace-9.0-libc-dlopen-glibc-2.34.patch |
38 |
new file mode 100644 |
39 |
index 000000000000..6c1aff4bcb31 |
40 |
--- /dev/null |
41 |
+++ b/dev-util/apitrace/files/apitrace-9.0-libc-dlopen-glibc-2.34.patch |
42 |
@@ -0,0 +1,29 @@ |
43 |
+https://github.com/apitrace/apitrace/commit/d28a980802ad48568c87da02d630c8babfe163bb.patch |
44 |
+https://bugs.gentoo.org/812155 |
45 |
+ |
46 |
+(rebased by sam) |
47 |
+ |
48 |
+From: Jose Fonseca <jfonseca@××××××.com> |
49 |
+Date: Wed, 1 Sep 2021 16:34:54 +0100 |
50 |
+Subject: [PATCH] gltrace: Avoid __libc_dlsym and __libc_dlopen_mode on GLIBC |
51 |
+ 2.34. |
52 |
+ |
53 |
+These GLIBC_PRIVATE symbols are gone from GLIBC 2.34 due to the merge of |
54 |
+libdl.so onto libc.so. |
55 |
+ |
56 |
+This means apitrace can't defend against infinite recursion when |
57 |
+used with Steam Overlay, but at least it should work otherwise. |
58 |
+ |
59 |
+Fixes https://github.com/apitrace/apitrace/issues/756 |
60 |
+--- a/wrappers/dlsym.cpp |
61 |
++++ b/wrappers/dlsym.cpp |
62 |
+@@ -34,7 +34,7 @@ |
63 |
+ #include "os.hpp" |
64 |
+ |
65 |
+ |
66 |
+-#ifdef __GLIBC__ |
67 |
++#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 34 |
68 |
+ |
69 |
+ |
70 |
+ #include <dlfcn.h> |
71 |
+ |