1 GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
2 # Local configure fragment for sysdeps/alpha/elf.
4 if test "$usetls" != no; then
5 # Check for support of thread-local storage handling in assembler and
7 AC_CACHE_CHECK(for Alpha TLS support, libc_cv_alpha_tls, [dnl
8 cat > conftest.s <<\EOF
9 .section ".tdata", "awT", @progbits
12 .section ".tbss", "awT", @nobits
18 ldq $27, __tls_get_addr($29) !literal!1
19 ldq $16, a($29) !tlsgd!1
20 jsr $26, ($27), __tls_get_addr !lituse_tlsgd!1
22 jsr $26, ($27), __tls_get_addr !lituse_tlsldm!2
23 ldq $27, __tls_get_addr($29) !literal!2
24 ldq $16, b($29) !tlsldm!2
26 ldq $16, c($29) !tlsgd
27 ldq $16, d($29) !tlsldm
29 ldq $16, e($29) !tlsgd!3
30 ldq $16, f($29) !tlsldm!4
32 ldq $16, g($29) !gotdtprel
33 ldah $16, h($31) !dtprelhi
34 lda $16, i($16) !dtprello
35 lda $16, j($31) !dtprel
37 ldq $16, k($29) !gottprel
38 ldah $16, l($31) !tprelhi
39 lda $16, m($16) !tprello
40 lda $16, n($31) !tprel
43 if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
49 if test $libc_cv_alpha_tls = yes; then
50 AC_DEFINE(HAVE_TLS_SUPPORT)
54 AC_CACHE_CHECK(for GP relative module local relocs, libc_cv_alpha_hidden_gprel, [dnl
55 cat > conftest.c <<\EOF
57 int baz __attribute__((visibility("hidden")));
66 libc_cv_alpha_hidden_gprel=no
67 if AC_TRY_COMMAND(${CC-cc} -S $CFLAGS -O2 -fpic conftest.c 1>&AS_MESSAGE_LOG_FD); then
68 if grep -q 'bar.*!gprel' conftest.s \
69 && grep -q 'baz.*!gprel' conftest.s \
70 && ! grep -q 'bar.*!literal' conftest.s \
71 && ! grep -q 'baz.*!literal' conftest.s; then
72 libc_cv_alpha_hidden_gprel=yes
76 if test $libc_cv_alpha_hidden_gprel = yes; then
77 AC_DEFINE(PI_STATIC_AND_HIDDEN)