add-use-elf-tls.patch 999 B

123456789101112131415161718192021222324252627282930
  1. diff --git a/meson.build b/meson.build
  2. index e1e94e7..b355f94 100644
  3. --- a/meson.build
  4. +++ b/meson.build
  5. @@ -447,7 +447,9 @@ endif
  6. # Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS.
  7. use_elf_tls = false
  8. -if (not ['freebsd', 'openbsd', 'haiku'].contains(host_machine.system()) and
  9. +with_use_elf_tls = get_option('use-elf-tls')
  10. +if with_use_elf_tls and
  11. + (not ['freebsd', 'openbsd', 'haiku'].contains(host_machine.system()) and
  12. (not with_platform_android or get_option('platform-sdk-version') >= 29) and
  13. (not with_platform_windows or not with_shared_glapi))
  14. pre_args += '-DUSE_ELF_TLS'
  15. diff --git a/meson_options.txt b/meson_options.txt
  16. index a7030ab..73bd28e 100644
  17. --- a/meson_options.txt
  18. +++ b/meson_options.txt
  19. @@ -465,3 +465,9 @@ option(
  20. value : true,
  21. description : 'use msse2 flag for mingw x86. Default: true',
  22. )
  23. +option(
  24. + 'use-elf-tls',
  25. + type : 'boolean',
  26. + value : false,
  27. + description : 'Build support for initial-exec TLS model'
  28. +)