blob: 74f7fe5c2dcd57de1d8afc2e221d982b13d35f84 [file] [log] [blame]
Andrew Geissler6ce62a22020-11-30 19:58:47 -06001From ce57ce220d9c377beabf4914f33c43118f672ffe Mon Sep 17 00:00:00 2001
Andrew Geissler82c905d2020-04-13 13:39:40 -05002From: Alistair Francis <alistair@alistair23.me>
3Date: Thu, 14 Nov 2019 13:08:31 -0800
Brad Bishop6dbb3162019-11-25 09:41:34 -05004Subject: [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]
Andrew Geissler82c905d2020-04-13 13:39:40 -050010Signed-off-by: Alistair Francis <alistair@alistair23.me>
Brad Bishop6dbb3162019-11-25 09:41:34 -050011
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
Andrew Geissler6ce62a22020-11-30 19:58:47 -060018index c5136ea..185270d 100644
Brad Bishop6dbb3162019-11-25 09:41:34 -050019--- a/meson.build
20+++ b/meson.build
Andrew Geissler6ce62a22020-11-30 19:58:47 -060021@@ -424,7 +424,7 @@ endif
Brad Bishop6dbb3162019-11-25 09:41:34 -050022
23 # Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS.
Andrew Geissler6ce62a22020-11-30 19:58:47 -060024 use_elf_tls = false
25-if not ['windows', 'freebsd', 'openbsd'].contains(host_machine.system()) and (not with_platform_android or get_option('platform-sdk-version') >= 29)
26+if not ['windows', 'freebsd', 'openbsd'].contains(host_machine.system()) and (not with_platform_android or get_option('platform-sdk-version') >= 29) and get_option('elf-tls')
Brad Bishop6dbb3162019-11-25 09:41:34 -050027 pre_args += '-DUSE_ELF_TLS'
Andrew Geissler6ce62a22020-11-30 19:58:47 -060028 use_elf_tls = true
Brad Bishop6dbb3162019-11-25 09:41:34 -050029 endif
Brad Bishop6dbb3162019-11-25 09:41:34 -050030diff --git a/meson_options.txt b/meson_options.txt
Andrew Geissler6ce62a22020-11-30 19:58:47 -060031index 2d39d13..72006eb 100644
Brad Bishop6dbb3162019-11-25 09:41:34 -050032--- a/meson_options.txt
33+++ b/meson_options.txt
Andrew Geissler6ce62a22020-11-30 19:58:47 -060034@@ -368,6 +368,12 @@ option(
Brad Bishop6dbb3162019-11-25 09:41:34 -050035 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(
Andrew Geissler475cb722020-07-10 16:00:51 -050045 'prefer-iris',
Brad Bishop6dbb3162019-11-25 09:41:34 -050046 type : 'boolean',