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
43
|
Upstream: https://gitlab.freedesktop.org/mesa/mesa/issues/966
Origin: Void Linux
Status: Pending
diff --git meson.build meson.build
index e1e94e71049..96ab3fb3e45 100644
--- a/meson.build
+++ b/meson.build
@@ -481,6 +481,9 @@ foreach platform : _platforms
pre_args += '-DHAVE_@0@_PLATFORM'.format(platform.to_upper())
endforeach
+use_elf_tls = false
+with_use_elf_tls = get_option('use-elf-tls')
+if (not ['freebsd', 'openbsd', 'haiku'].contains(host_machine.system()) and with_use_elf_tls)
use_elf_tls = true
pre_args += '-DUSE_ELF_TLS'
@@ -491,6 +494,7 @@ if with_platform_android and get_option('platform-sdk-version') >= 29
c_args += '-fno-emulated-tls'
cpp_args += '-fno-emulated-tls'
endif
+endif
# -mtls-dialect=gnu2 speeds up non-initial-exec TLS significantly but requires
# full toolchain (including libc) support.
diff --git meson_options.txt meson_options.txt
index a7030aba31e..966cfeca298 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -446,6 +446,12 @@ option(
value : 25,
description : 'Android Platform SDK version. Default: Nougat version.'
)
+option(
+ 'use-elf-tls',
+ type : 'boolean',
+ value : true,
+ description : 'Build support for initial-exec TLS model'
+)
option(
'zstd',
type : 'combo',
|