void-packages/srcpkgs/mesa/patches/add-elf-use-tls.patch

30 lines
985 B
Diff

--- a/meson.build 2022-09-20 17:01:37.000000000 -0400
+++ b/meson.build 2022-10-04 16:17:45.905483957 -0400
@@ -504,6 +504,11 @@
pre_args += '-DHAVE_@0@_PLATFORM'.format(platform.to_upper())
endforeach
+use_elf_tls = get_option('use-elf-tls')
+if use_elf_tls
+ pre_args += '-DUSE_ELF_TLS'
+endif
+
if with_platform_android and get_option('platform-sdk-version') >= 29
# 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
--- a/meson_options.txt 2022-09-20 17:01:37.000000000 -0400
+++ b/meson_options.txt 2022-10-04 16:21:30.469304615 -0400
@@ -472,6 +472,12 @@
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',
choices : ['auto', 'true', 'false', 'enabled', 'disabled'],