blob: 199ed572d5c79525adb54a3ba7ecd4be34763aea [file] [log] [blame]
Brad Bishop6dbb3162019-11-25 09:41:34 -05001From af6923544de02ded648a736e07b9bd8b7c52dba9 Mon Sep 17 00:00:00 2001
2From: Alistair Francis <alistair.francis@wdc.com>
3Date: Wed, 23 Oct 2019 09:46:28 -0700
4Subject: [PATCH] meson.build: make TLS ELF optional
5
6USE_ELF_TLS has replaced GLX_USE_TLS so this patch is the original "make
7TLS GLX optional again" patch updated to the latest mesa.
8
9Upstream-Status: Inappropriate [configuration]
10Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
11
12---
13 meson.build | 2 +-
14 meson_options.txt | 6 ++++++
15 2 files changed, 7 insertions(+), 1 deletion(-)
16
17diff --git a/meson.build b/meson.build
18index a1f098c..1e31eb4 100644
19--- a/meson.build
20+++ b/meson.build
21@@ -378,7 +378,7 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless or with_plat
22 endif
23
24 # Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS.
25-if not with_platform_android or get_option('platform-sdk-version') >= 29
26+if (not with_platform_android or get_option('platform-sdk-version') >= 29) and get_option('elf-tls')
27 pre_args += '-DUSE_ELF_TLS'
28 endif
29
30diff --git a/meson_options.txt b/meson_options.txt
31index b768c15..76cef24 100644
32--- a/meson_options.txt
33+++ b/meson_options.txt
34@@ -333,6 +333,12 @@ option(
35 value : true,
36 description : 'Enable direct rendering in GLX and EGL for DRI',
37 )
38+option(
39+ 'elf-tls',
40+ type : 'boolean',
41+ value : true,
42+ description : 'Enable TLS support in ELF',
43+)
44 option(
45 'I-love-half-baked-turnips',
46 type : 'boolean',