maintain option to control elf-tls not suitable for upstream --- meson.build 2022-03-21 08:03:41.891463306 -0700 +++ meson.build 2022-03-21 08:10:47.811295661 -0700 @@ -497,7 +497,7 @@ use_elf_tls = false 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)) + (not with_platform_windows or not with_shared_glapi) and (get_option('elf-tls') != false)) pre_args += '-DUSE_ELF_TLS' use_elf_tls = true --- meson_options.txt 2022-03-21 08:11:01.301024612 -0700 +++ meson_options.txt 2022-03-21 08:11:26.626742487 -0700 @@ -402,6 +402,12 @@ description : 'Enable execmem support. Without execmem, glapi will fail to generate dynamic glapi stubs when entrypoints unknown to glapi but known to DRI drivers are requested in eglGetProcAddress or glXGetProcAddress. This should be enabled unless the platform can guarantee glapi and DRI drivers are always built from the same source tree.' ) option( + 'elf-tls', + type : 'boolean', + value : true, + description : 'Enable thread-local storage in GLX and EGL' +) +option( 'osmesa', type : 'boolean', value : false,