2.9
[glibc/nacl-glibc.git] / sysdeps / alpha / elf / configure
blobea99e354169052eda45e8d95a80ef66a9b2ac381
1 # This file is generated from configure.in by Autoconf.  DO NOT EDIT!
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
6 # linker.
7 echo "$as_me:$LINENO: checking for Alpha TLS support" >&5
8 echo $ECHO_N "checking for Alpha TLS support... $ECHO_C" >&6
9 if test "${libc_cv_alpha_tls+set}" = set; then
10   echo $ECHO_N "(cached) $ECHO_C" >&6
11 else
12   cat > conftest.s <<\EOF
13         .section ".tdata", "awT", @progbits
14         .globl foo
15 foo:    .quad   1
16         .section ".tbss", "awT", @nobits
17         .globl bar
18 bar:    .skip   8
19         .text
20 baz:
21         .set nomacro
22         ldq     $27, __tls_get_addr($29)        !literal!1
23         ldq     $16, a($29)                     !tlsgd!1
24         jsr     $26, ($27), __tls_get_addr      !lituse_tlsgd!1
26         jsr     $26, ($27), __tls_get_addr      !lituse_tlsldm!2
27         ldq     $27, __tls_get_addr($29)        !literal!2
28         ldq     $16, b($29)                     !tlsldm!2
30         ldq     $16, c($29)                     !tlsgd
31         ldq     $16, d($29)                     !tlsldm
33         ldq     $16, e($29)                     !tlsgd!3
34         ldq     $16, f($29)                     !tlsldm!4
36         ldq     $16, g($29)                     !gotdtprel
37         ldah    $16, h($31)                     !dtprelhi
38         lda     $16, i($16)                     !dtprello
39         lda     $16, j($31)                     !dtprel
41         ldq     $16, k($29)                     !gottprel
42         ldah    $16, l($31)                     !tprelhi
43         lda     $16, m($16)                     !tprello
44         lda     $16, n($31)                     !tprel
45 EOF
46 if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'
47   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
48   (eval $ac_try) 2>&5
49   ac_status=$?
50   echo "$as_me:$LINENO: \$? = $ac_status" >&5
51   (exit $ac_status); }; }; then
52   libc_cv_alpha_tls=yes
53 else
54   libc_cv_alpha_tls=no
56 rm -f conftest*
58 echo "$as_me:$LINENO: result: $libc_cv_alpha_tls" >&5
59 echo "${ECHO_T}$libc_cv_alpha_tls" >&6
60 if test $libc_cv_alpha_tls = yes; then
61   cat >>confdefs.h <<\_ACEOF
62 #define HAVE_TLS_SUPPORT 1
63 _ACEOF
68 echo "$as_me:$LINENO: checking for GP relative module local relocs" >&5
69 echo $ECHO_N "checking for GP relative module local relocs... $ECHO_C" >&6
70 if test "${libc_cv_alpha_hidden_gprel+set}" = set; then
71   echo $ECHO_N "(cached) $ECHO_C" >&6
72 else
73   cat > conftest.c <<\EOF
74 static int bar;
75 int baz __attribute__((visibility("hidden")));
77 int foo (void)
79   return bar + baz;
81 EOF
83 libc_cv_alpha_hidden_gprel=no
84 if { ac_try='${CC-cc} -S $CFLAGS -O2 -fpic conftest.c 1>&5'
85   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
86   (eval $ac_try) 2>&5
87   ac_status=$?
88   echo "$as_me:$LINENO: \$? = $ac_status" >&5
89   (exit $ac_status); }; }; then
90   if grep -q 'bar.*!gprel' conftest.s \
91      && grep -q 'baz.*!gprel' conftest.s \
92      && ! grep -q 'bar.*!literal' conftest.s \
93      && ! grep -q 'baz.*!literal' conftest.s; then
94     libc_cv_alpha_hidden_gprel=yes
95   fi
97 rm -f conftest*
99 echo "$as_me:$LINENO: result: $libc_cv_alpha_hidden_gprel" >&5
100 echo "${ECHO_T}$libc_cv_alpha_hidden_gprel" >&6
101 if test $libc_cv_alpha_hidden_gprel = yes; then
102   cat >>confdefs.h <<\_ACEOF
103 #define PI_STATIC_AND_HIDDEN 1
104 _ACEOF