meson: tlsdesc: minor reformatting, add comments
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14027>
This commit is contained in:
parent
96cc300746
commit
19f88eb858
|
@ -516,10 +516,13 @@ if not have_mtls_dialect
|
|||
warning('cannot auto-detect -mtls-dialect when cross-compiling, using compiler default')
|
||||
else
|
||||
# -fpic to force dynamic tls, otherwise TLS relaxation defeats check
|
||||
gnu2_test = cc.run('int __thread x; int main() { return x; }', args: ['-mtls-dialect=gnu2', '-fpic'], name: '-mtls-dialect=gnu2')
|
||||
gnu2_test = cc.run('int __thread x; int main() { return x; }',
|
||||
args: ['-mtls-dialect=gnu2', '-fpic'],
|
||||
name: '-mtls-dialect=gnu2')
|
||||
if gnu2_test.returncode() == 0 and (
|
||||
# check for lld 13 bug: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5665
|
||||
host_machine.cpu_family() != 'x86_64' or
|
||||
# https://github.com/mesonbuild/meson/issues/6377
|
||||
# get_linker_id misses LDFLAGS=-fuse-ld=lld: https://github.com/mesonbuild/meson/issues/6377
|
||||
#cc.get_linker_id() != 'ld.lld' or
|
||||
cc.links('''int __thread x; int y; int main() { __asm__(
|
||||
"leaq x@TLSDESC(%rip), %rax\n"
|
||||
|
|
Loading…
Reference in New Issue