Remove configure test for ARM TLS descriptors support.
[glibc.git] / sysdeps / arm / configure
blob431e843b2b51694b84b14257b8a339b262840a64
1 # This file is generated from configure.ac by Autoconf.  DO NOT EDIT!
2  # Local configure fragment for sysdeps/arm.
4 $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
7 # We check to see if the compiler and flags are
8 # selecting the hard-float ABI and if they are then
9 # we set libc_cv_arm_pcs_vfp to yes which causes
10 # HAVE_ARM_PCS_VFP to be defined in config.h and
11 # in include/libc-symbols.h and thus available to
12 # shlib-versions to select the appropriate name for
13 # the dynamic linker via %ifdef.
16 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
17 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
18 if ${ac_cv_path_GREP+:} false; then :
19   $as_echo_n "(cached) " >&6
20 else
21   if test -z "$GREP"; then
22   ac_path_GREP_found=false
23   # Loop through the user's path and test for each of PROGNAME-LIST
24   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
27   IFS=$as_save_IFS
28   test -z "$as_dir" && as_dir=.
29     for ac_prog in grep ggrep; do
30     for ac_exec_ext in '' $ac_executable_extensions; do
31       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
32       as_fn_executable_p "$ac_path_GREP" || continue
33 # Check for GNU ac_path_GREP and select it if it is found.
34   # Check for GNU $ac_path_GREP
35 case `"$ac_path_GREP" --version 2>&1` in
36 *GNU*)
37   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
39   ac_count=0
40   $as_echo_n 0123456789 >"conftest.in"
41   while :
42   do
43     cat "conftest.in" "conftest.in" >"conftest.tmp"
44     mv "conftest.tmp" "conftest.in"
45     cp "conftest.in" "conftest.nl"
46     $as_echo 'GREP' >> "conftest.nl"
47     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
48     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
49     as_fn_arith $ac_count + 1 && ac_count=$as_val
50     if test $ac_count -gt ${ac_path_GREP_max-0}; then
51       # Best one so far, save it but keep looking for a better one
52       ac_cv_path_GREP="$ac_path_GREP"
53       ac_path_GREP_max=$ac_count
54     fi
55     # 10*(2^10) chars as input seems more than enough
56     test $ac_count -gt 10 && break
57   done
58   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
59 esac
61       $ac_path_GREP_found && break 3
62     done
63   done
64   done
65 IFS=$as_save_IFS
66   if test -z "$ac_cv_path_GREP"; then
67     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
68   fi
69 else
70   ac_cv_path_GREP=$GREP
74 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
75 $as_echo "$ac_cv_path_GREP" >&6; }
76  GREP="$ac_cv_path_GREP"
79 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
80 $as_echo_n "checking for egrep... " >&6; }
81 if ${ac_cv_path_EGREP+:} false; then :
82   $as_echo_n "(cached) " >&6
83 else
84   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
85    then ac_cv_path_EGREP="$GREP -E"
86    else
87      if test -z "$EGREP"; then
88   ac_path_EGREP_found=false
89   # Loop through the user's path and test for each of PROGNAME-LIST
90   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
91 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
93   IFS=$as_save_IFS
94   test -z "$as_dir" && as_dir=.
95     for ac_prog in egrep; do
96     for ac_exec_ext in '' $ac_executable_extensions; do
97       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
98       as_fn_executable_p "$ac_path_EGREP" || continue
99 # Check for GNU ac_path_EGREP and select it if it is found.
100   # Check for GNU $ac_path_EGREP
101 case `"$ac_path_EGREP" --version 2>&1` in
102 *GNU*)
103   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
105   ac_count=0
106   $as_echo_n 0123456789 >"conftest.in"
107   while :
108   do
109     cat "conftest.in" "conftest.in" >"conftest.tmp"
110     mv "conftest.tmp" "conftest.in"
111     cp "conftest.in" "conftest.nl"
112     $as_echo 'EGREP' >> "conftest.nl"
113     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
114     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
115     as_fn_arith $ac_count + 1 && ac_count=$as_val
116     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
117       # Best one so far, save it but keep looking for a better one
118       ac_cv_path_EGREP="$ac_path_EGREP"
119       ac_path_EGREP_max=$ac_count
120     fi
121     # 10*(2^10) chars as input seems more than enough
122     test $ac_count -gt 10 && break
123   done
124   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
125 esac
127       $ac_path_EGREP_found && break 3
128     done
129   done
130   done
131 IFS=$as_save_IFS
132   if test -z "$ac_cv_path_EGREP"; then
133     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
134   fi
135 else
136   ac_cv_path_EGREP=$EGREP
139    fi
141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
142 $as_echo "$ac_cv_path_EGREP" >&6; }
143  EGREP="$ac_cv_path_EGREP"
146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is using the ARM hard-float ABI" >&5
147 $as_echo_n "checking whether the compiler is using the ARM hard-float ABI... " >&6; }
148 if ${libc_cv_arm_pcs_vfp+:} false; then :
149   $as_echo_n "(cached) " >&6
150 else
151   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
152 /* end confdefs.h.  */
153 #ifdef __ARM_PCS_VFP
154                       yes
155                      #endif
157 _ACEOF
158 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
159   $EGREP "yes" >/dev/null 2>&1; then :
160   libc_cv_arm_pcs_vfp=yes
161 else
162   libc_cv_arm_pcs_vfp=no
164 rm -f conftest*
167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_arm_pcs_vfp" >&5
168 $as_echo "$libc_cv_arm_pcs_vfp" >&6; }
169 if test $libc_cv_arm_pcs_vfp = yes; then
170   $as_echo "#define HAVE_ARM_PCS_VFP 1" >>confdefs.h
172   config_vars="$config_vars
173 default-abi = hard"
174 else
175   config_vars="$config_vars
176 default-abi = soft"
179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether PC-relative relocs in movw/movt work properly" >&5
180 $as_echo_n "checking whether PC-relative relocs in movw/movt work properly... " >&6; }
181 if ${libc_cv_arm_pcrel_movw+:} false; then :
182   $as_echo_n "(cached) " >&6
183 else
185 cat > conftest.s <<\EOF
186         .syntax unified
187         .arm
188         .arch armv7-a
190         .text
191         .globl foo
192         .type foo,%function
193 foo:    movw r0, #:lower16:symbol - 1f - 8
194         movt r0, #:upper16:symbol - 1f - 8
195 1:      add r0, pc
196         @ And now a case with a local symbol.
197         movw r0, #:lower16:3f - 2f - 8
198         movt r0, #:upper16:3f - 2f - 8
199 2:      add r0, pc
200         bx lr
202 .data
203         .globl symbol
204         .hidden symbol
205 symbol: .long 23
206 3:      .long 17
208 libc_cv_arm_pcrel_movw=no
209 ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \
210          -nostartfiles -nostdlib -shared \
211          -o conftest.so conftest.s 1>&5 2>&5 &&
212 LC_ALL=C $READELF -dr conftest.so > conftest.dr 2>&5 &&
214   cat conftest.dr 1>&5
215   fgrep 'TEXTREL
216 R_ARM_NONE' conftest.dr > /dev/null || libc_cv_arm_pcrel_movw=yes
218 rm -f conftest*
220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_arm_pcrel_movw" >&5
221 $as_echo "$libc_cv_arm_pcrel_movw" >&6; }
222 if test $libc_cv_arm_pcrel_movw = yes; then
223   $as_echo "#define ARM_PCREL_MOVW_OK 1" >>confdefs.h
227 # This was buggy in assemblers from GNU binutils versions before 2.25.1
228 # (it's known to be broken in 2.24 and 2.25; see
229 # https://sourceware.org/bugzilla/show_bug.cgi?id=18383).
230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether TPOFF relocs with addends are assembled correctly" >&5
231 $as_echo_n "checking whether TPOFF relocs with addends are assembled correctly... " >&6; }
232 if ${libc_cv_arm_tpoff_addend+:} false; then :
233   $as_echo_n "(cached) " >&6
234 else
236 cat > conftest.s <<\EOF
237         .syntax unified
238         .arm
239         .arch armv7-a
241         .text
242 foo:
243         .word tbase(tpoff)+4
245         .section .tdata,"awT",%progbits
246         .word -4
247 tbase:  .word 0
248         .word 4
250 libc_cv_arm_tpoff_addend=no
251 ${CC-cc} -c $CFLAGS $CPPFLAGS \
252          -o conftest.o conftest.s 1>&5 2>&5 &&
253 LC_ALL=C $READELF -x.text conftest.o > conftest.x 2>&5 &&
255   cat conftest.x 1>&5
256   $AWK 'BEGIN { result = 2 }
257 $1 ~ /0x0+/ && $2 ~ /[0-9a-f]+/ {
258 # Check for little-endian or big-endian encoding of 4 in the in-place addend.
259   result = ($2 == "04000000" || $2 == "00000004") ? 0 : 1
261 END { exit(result) }
262 ' conftest.x 2>&5 && libc_cv_arm_tpoff_addend=yes
264 rm -f conftest*
266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_arm_tpoff_addend" >&5
267 $as_echo "$libc_cv_arm_tpoff_addend" >&6; }
268 if test $libc_cv_arm_tpoff_addend = no; then
269   config_vars="$config_vars
270 test-xfail-tst-tlsalign = yes"
271   config_vars="$config_vars
272 test-xfail-tst-tlsalign-static = yes"
276 libc_cv_gcc_unwind_find_fde=no
278 # Remove -fno-unwind-tables that was added in sysdeps/arm/preconfigure.ac.
279 CFLAGS=${CFLAGS% -fno-unwind-tables}