summaryrefslogtreecommitdiff
path: root/user/mesa/no-tls.patch
diff options
context:
space:
mode:
Diffstat (limited to 'user/mesa/no-tls.patch')
-rw-r--r--user/mesa/no-tls.patch20
1 files changed, 15 insertions, 5 deletions
diff --git a/user/mesa/no-tls.patch b/user/mesa/no-tls.patch
index a6b989e87..803fa3707 100644
--- a/user/mesa/no-tls.patch
+++ b/user/mesa/no-tls.patch
@@ -1,14 +1,24 @@
---- mesa-20.3.5/meson.build.old 2021-03-24 14:10:48.523084000 -0500
-+++ mesa-20.3.5/meson.build 2022-05-29 23:43:09.679306824 -0500
-@@ -434,12 +434,7 @@
- with_egl = false
+--- mesa-21.3.8/meson.build.old 2022-03-18 14:26:47.000000000 -0500
++++ mesa-21.3.8/meson.build 2022-05-30 00:00:21.689085198 -0500
+@@ -508,22 +508,7 @@
+ error('-Degl-native-platform does not specify an enabled platform')
endif
-# Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS.
use_elf_tls = false
--if not ['windows', 'freebsd', 'openbsd'].contains(host_machine.system()) and (not with_platform_android or get_option('platform-sdk-version') >= 29)
+-if (not ['freebsd', 'openbsd', 'haiku'].contains(host_machine.system()) and
+- (not with_platform_android or get_option('platform-sdk-version') >= 29) and
+- (not with_platform_windows or not with_shared_glapi))
- pre_args += '-DUSE_ELF_TLS'
- use_elf_tls = true
+-
+- if with_platform_android
+- # By default the NDK compiler, at least, emits emutls references instead of
+- # ELF TLS, even when building targeting newer API levels. Make it actually do
+- # ELF TLS instead.
+- c_args += '-fno-emulated-tls'
+- cpp_args += '-fno-emulated-tls'
+- endif
-endif
if with_glx != 'disabled'