2.9
[glibc/nacl-glibc.git] / sysdeps / x86_64 / elf / configure.in
blob9cb59d009c017d82348cffcb7cccac33f736fc87
1 GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
2 # Local configure fragment for sysdeps/x86_64/elf.
4 if test "$usetls" != no; then
5 # Check for support of thread-local storage handling in assembler and linker.
6 AC_CACHE_CHECK(for x86-64 TLS support, libc_cv_x86_64_tls, [dnl
7 cat > conftest.s <<\EOF
8         .section ".tdata", "awT", @progbits
9         .globl foo
10 foo:    .quad   1
11         .section ".tbss", "awT", @nobits
12         .globl bar
13 bar:    .skip   8
14         .text
15 baz:    leaq    bar@TLSLD(%rip), %rdi
16         leaq    bar@DTPOFF(%rax), %rcx
17         addq    foo@GOTTPOFF(%rip), %rax
18         movq    $bar@TPOFF, %rdx
19 EOF
20 dnl
21 if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
22   libc_cv_x86_64_tls=yes
23 else
24   libc_cv_x86_64_tls=no
26 rm -f conftest*])
27 if test $libc_cv_x86_64_tls = yes; then
28   AC_DEFINE(HAVE_TLS_SUPPORT)
32 dnl It is always possible to access static and hidden symbols in an
33 dnl position independent way.
34 AC_DEFINE(PI_STATIC_AND_HIDDEN)