2.9
[glibc/nacl-glibc.git] / sysdeps / s390 / s390-64 / elf / configure.in
blobac953fcff34b6fdb6dff6e2325cfa3babc6e9803
1 GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
2 # Local configure fragment for sysdeps/s390/elf.
4 if test "$usetls" != no; then
5 # Check for support of thread-local storage handling in assembler and
6 # linker.
7 AC_CACHE_CHECK(for s390 TLS support, libc_cv_390_tls, [dnl
8 cat > conftest.S <<\EOF
9         .section ".tdata", "awT", @progbits
10 foo:    .long   25
11         .text
12         .quad   foo@TLSGD
13         .quad   foo@TLSLDM
14         .quad   foo@DTPOFF
15         .quad   foo@NTPOFF
16         .quad   foo@GOTNTPOFF
17         .quad   foo@INDNTPOFF
18         lg      %r1,foo@GOTNTPOFF(%r12)
19         lg      %r1,0(%r1):tls_load:foo
20         brasl   %r14,__tls_get_offset@plt:tls_gdcall:foo
21         brasl   %r14,__tls_get_offset@plt:tls_ldcall:foo
22 EOF
23 dnl
24 if AC_TRY_COMMAND(${CC-cc} -S $CFLAGS conftest.S 1>&AS_MESSAGE_LOG_FD); then
25   libc_cv_390_tls=yes
26 else
27   libc_cv_390_tls=no
29 rm -f conftest*])
30 if test $libc_cv_390_tls = yes; then
31   AC_DEFINE(HAVE_TLS_SUPPORT)
35 dnl It is always possible to access static and hidden symbols in an
36 dnl position independent way.
37 AC_DEFINE(PI_STATIC_AND_HIDDEN)