1 |
commit: c2ac367b649aeab3ce9cbf8e1184f204f255ad93 |
2 |
Author: Jory A. Pratt <anarchy <AT> bull <DOT> penguingeek> |
3 |
AuthorDate: Thu Mar 14 23:26:27 2019 +0000 |
4 |
Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Mar 14 23:26:27 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=c2ac367b |
7 |
|
8 |
media-libs/mesa - address bug #670052 with upstream patch to disable tls |
9 |
|
10 |
.../mesa-18.2.4-add-disable-tls-support.patch | 46 ++++++++++++++++++++++ |
11 |
media-libs/mesa/mesa-18.2.4.ebuild | 6 +++ |
12 |
2 files changed, 52 insertions(+) |
13 |
|
14 |
diff --git a/media-libs/mesa/files/mesa-18.2.4-add-disable-tls-support.patch b/media-libs/mesa/files/mesa-18.2.4-add-disable-tls-support.patch |
15 |
new file mode 100644 |
16 |
index 0000000..7eebc0d |
17 |
--- /dev/null |
18 |
+++ b/media-libs/mesa/files/mesa-18.2.4-add-disable-tls-support.patch |
19 |
@@ -0,0 +1,46 @@ |
20 |
+From beca1b215950f4e917c21f916fd3c16fb09fb3fa Mon Sep 17 00:00:00 2001 |
21 |
+From: root <root@××××.penguingeek> |
22 |
+Date: Wed, 6 Mar 2019 15:52:59 -0600 |
23 |
+Subject: [PATCH] Allow disable tls for musl |
24 |
+ |
25 |
+--- |
26 |
+ meson.build | 5 ++++- |
27 |
+ meson_options.txt | 6 ++++++ |
28 |
+ 2 files changed, 10 insertions(+), 1 deletion(-) |
29 |
+ |
30 |
+diff --git a/meson.build b/meson.build |
31 |
+index 5b0eea1..d6a7675 100644 |
32 |
+--- a/meson.build |
33 |
++++ b/meson.build |
34 |
+@@ -327,7 +327,10 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless) |
35 |
+ endif |
36 |
+ endif |
37 |
+ |
38 |
+-pre_args += '-DGLX_USE_TLS' |
39 |
++if get_option('glx-tls') |
40 |
++ pre_args += '-DGLX_USE_TLS' |
41 |
++endif |
42 |
++ |
43 |
+ if with_glx != 'disabled' |
44 |
+ if not (with_platform_x11 and with_any_opengl) |
45 |
+ error('Cannot build GLX support without X11 platform support and at least one OpenGL API') |
46 |
+diff --git a/meson_options.txt b/meson_options.txt |
47 |
+index 5bb560b..3b721a6 100644 |
48 |
+--- a/meson_options.txt |
49 |
++++ b/meson_options.txt |
50 |
+@@ -277,6 +277,12 @@ option( |
51 |
+ choices : ['none', 'classic', 'gallium'], |
52 |
+ description : 'Build OSmesa.' |
53 |
+ ) |
54 |
++option( |
55 |
++ 'glx-tls', |
56 |
++ type : 'boolean', |
57 |
++ value : true, |
58 |
++ description : 'Enable thread-local storage in GLX and EGL' |
59 |
++) |
60 |
+ option( |
61 |
+ 'osmesa-bits', |
62 |
+ type : 'combo', |
63 |
+-- |
64 |
+2.21.0 |
65 |
+ |
66 |
|
67 |
diff --git a/media-libs/mesa/mesa-18.2.4.ebuild b/media-libs/mesa/mesa-18.2.4.ebuild |
68 |
index ab4c917..09f49a9 100644 |
69 |
--- a/media-libs/mesa/mesa-18.2.4.ebuild |
70 |
+++ b/media-libs/mesa/mesa-18.2.4.ebuild |
71 |
@@ -238,6 +238,7 @@ PATCHES=( |
72 |
"${FILESDIR}"/${PN}-18-musl-invocation_name.patch |
73 |
"${FILESDIR}"/${PN}-18-musl-pthread.patch |
74 |
"${FILESDIR}"/${PN}-18-musl-amdgpu-include-pthread.patch |
75 |
+ "${FILESDIR}"/${P}-add-disable-tls-support.patch |
76 |
) |
77 |
|
78 |
llvm_check_deps() { |
79 |
@@ -451,6 +452,11 @@ multilib_src_configure() { |
80 |
emesonargs+=( $(meson_use pax_kernel glx-read-only-text) ) |
81 |
fi |
82 |
|
83 |
+ # Disable glx tls support on musl |
84 |
+ if use elibc_musl; then |
85 |
+ emesonargs+=( -Dglx-tls=false ) |
86 |
+ fi |
87 |
+ |
88 |
# on abi_x86_32 hardened we need to have asm disable |
89 |
if [[ ${ABI} == x86* ]] && use pic; then |
90 |
emesonargs+=( -Dasm=false ) |