2.9
[glibc/nacl-glibc.git] / sysdeps / i386 / elf / configure.in
blobca607adeb52b887fc27406baed652a2c9fc0690b
1 GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
2 # Local configure fragment for sysdeps/i386/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 i386 TLS support, libc_cv_386_tls, [dnl
8 cat > conftest.s <<\EOF
9         .section ".tdata", "awT", @progbits
10         .globl foo
11 foo:    .long   1
12         .section ".tbss", "awT", @nobits
13         .globl bar
14 bar:    .skip   4
15         .text
16 baz:    leal    bar@TLSLDM(%ebx), %eax
17         leal    bar@DTPOFF(%eax), %edx
18         subl    foo@GOTTPOFF(%edx), %eax
19         subl    $bar@TPOFF, %eax
20         movl    foo@GOTNTPOFF(%edx), %ecx
21         movl    %gs:(%ecx), %eax
22         movl    %gs:bar@NTPOFF, %eax
23 EOF
24 dnl
25 if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
26   libc_cv_386_tls=yes
27 else
28   libc_cv_386_tls=no
30 rm -f conftest*])
31 if test $libc_cv_386_tls = yes; then
32   AC_DEFINE(HAVE_TLS_SUPPORT)
36 dnl It is always possible to access static and hidden symbols in an
37 dnl position independent way.
38 AC_DEFINE(PI_STATIC_AND_HIDDEN)