1 # This file is generated from configure.ac by Autoconf. DO NOT EDIT!
2 # Local configure fragment for sysdeps/arm.
4 # We check to see if the compiler and flags are
5 # selecting the hard-float ABI and if they are then
6 # we set libc_cv_arm_pcs_vfp to yes which causes
7 # HAVE_ARM_PCS_VFP to be defined in config.h and
8 # in include/libc-symbols.h and thus available to
9 # shlib-versions to select the appropriate name for
10 # the dynamic linker via %ifdef.
13 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
14 printf %s "checking for grep that handles long lines and -e... " >&6; }
15 if test ${ac_cv_path_GREP+y}
17 printf %s "(cached) " >&6
19 if test -z "$GREP"; then
20 ac_path_GREP_found=false
21 # Loop through the user's path and test for each of PROGNAME-LIST
22 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
31 for ac_prog in grep ggrep
33 for ac_exec_ext in '' $ac_executable_extensions; do
34 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
35 as_fn_executable_p "$ac_path_GREP" || continue
36 # Check for GNU ac_path_GREP and select it if it is found.
37 # Check for GNU $ac_path_GREP
38 case `"$ac_path_GREP" --version 2>&1` in
40 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
43 printf %s 0123456789 >"conftest.in"
46 cat "conftest.in" "conftest.in" >"conftest.tmp"
47 mv "conftest.tmp" "conftest.in"
48 cp "conftest.in" "conftest.nl"
49 printf "%s\n" 'GREP' >> "conftest.nl"
50 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
51 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
52 as_fn_arith $ac_count + 1 && ac_count=$as_val
53 if test $ac_count -gt ${ac_path_GREP_max-0}; then
54 # Best one so far, save it but keep looking for a better one
55 ac_cv_path_GREP="$ac_path_GREP"
56 ac_path_GREP_max=$ac_count
58 # 10*(2^10) chars as input seems more than enough
59 test $ac_count -gt 10 && break
61 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
64 $ac_path_GREP_found && break 3
69 if test -z "$ac_cv_path_GREP"; then
70 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
77 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
78 printf "%s\n" "$ac_cv_path_GREP" >&6; }
79 GREP="$ac_cv_path_GREP"
82 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
83 printf %s "checking for egrep... " >&6; }
84 if test ${ac_cv_path_EGREP+y}
86 printf %s "(cached) " >&6
88 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
89 then ac_cv_path_EGREP="$GREP -E"
91 if test -z "$EGREP"; then
92 ac_path_EGREP_found=false
93 # Loop through the user's path and test for each of PROGNAME-LIST
94 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
95 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
101 *) as_dir=$as_dir/ ;;
105 for ac_exec_ext in '' $ac_executable_extensions; do
106 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
107 as_fn_executable_p "$ac_path_EGREP" || continue
108 # Check for GNU ac_path_EGREP and select it if it is found.
109 # Check for GNU $ac_path_EGREP
110 case `"$ac_path_EGREP" --version 2>&1` in
112 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
115 printf %s 0123456789 >"conftest.in"
118 cat "conftest.in" "conftest.in" >"conftest.tmp"
119 mv "conftest.tmp" "conftest.in"
120 cp "conftest.in" "conftest.nl"
121 printf "%s\n" 'EGREP' >> "conftest.nl"
122 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
123 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
124 as_fn_arith $ac_count + 1 && ac_count=$as_val
125 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
126 # Best one so far, save it but keep looking for a better one
127 ac_cv_path_EGREP="$ac_path_EGREP"
128 ac_path_EGREP_max=$ac_count
130 # 10*(2^10) chars as input seems more than enough
131 test $ac_count -gt 10 && break
133 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
136 $ac_path_EGREP_found && break 3
141 if test -z "$ac_cv_path_EGREP"; then
142 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
145 ac_cv_path_EGREP=$EGREP
150 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
151 printf "%s\n" "$ac_cv_path_EGREP" >&6; }
152 EGREP="$ac_cv_path_EGREP"
155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler is using the ARM hard-float ABI" >&5
156 printf %s "checking whether the compiler is using the ARM hard-float ABI... " >&6; }
157 if test ${libc_cv_arm_pcs_vfp+y}
159 printf %s "(cached) " >&6
161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
162 /* end confdefs.h. */
168 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
169 $EGREP "yes" >/dev/null 2>&1
171 libc_cv_arm_pcs_vfp=yes
173 libc_cv_arm_pcs_vfp=no
178 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_arm_pcs_vfp" >&5
179 printf "%s\n" "$libc_cv_arm_pcs_vfp" >&6; }
180 if test $libc_cv_arm_pcs_vfp = yes; then
181 printf "%s\n" "#define HAVE_ARM_PCS_VFP 1" >>confdefs.h
183 config_vars="$config_vars
186 config_vars="$config_vars
190 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether VFP supports 32 registers" >&5
191 printf %s "checking whether VFP supports 32 registers... " >&6; }
192 if test ${libc_cv_arm_pcs_vfp_d32+y}
194 printf %s "(cached) " >&6
197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
198 /* end confdefs.h. */
202 asm volatile ("vldr d16,=17" : : : "d16");
206 if ac_fn_c_try_compile "$LINENO"
208 libc_cv_arm_pcs_vfp_d32=yes
210 libc_cv_arm_pcs_vfp_d32=no
212 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_arm_pcs_vfp_d32" >&5
215 printf "%s\n" "$libc_cv_arm_pcs_vfp_d32" >&6; }
216 if test "$libc_cv_arm_pcs_vfp_d32" = yes ;
218 printf "%s\n" "#define HAVE_ARM_PCS_VFP_D32 1" >>confdefs.h
222 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether PC-relative relocs in movw/movt work properly" >&5
223 printf %s "checking whether PC-relative relocs in movw/movt work properly... " >&6; }
224 if test ${libc_cv_arm_pcrel_movw+y}
226 printf %s "(cached) " >&6
229 cat > conftest.s <<\EOF
237 foo: movw r0, #:lower16:symbol - 1f - 8
238 movt r0, #:upper16:symbol - 1f - 8
240 @ And now a case with a local symbol.
241 movw r0, #:lower16:3f - 2f - 8
242 movt r0, #:upper16:3f - 2f - 8
252 libc_cv_arm_pcrel_movw=no
253 ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \
254 -nostartfiles -nostdlib -shared \
255 -o conftest.so conftest.s 1>&5 2>&5 &&
256 LC_ALL=C $READELF -dr conftest.so > conftest.dr 2>&5 &&
260 R_ARM_NONE' conftest.dr > /dev/null || libc_cv_arm_pcrel_movw=yes
264 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_arm_pcrel_movw" >&5
265 printf "%s\n" "$libc_cv_arm_pcrel_movw" >&6; }
266 if test $libc_cv_arm_pcrel_movw = yes; then
267 printf "%s\n" "#define ARM_PCREL_MOVW_OK 1" >>confdefs.h
271 # This was buggy in assemblers from GNU binutils versions before 2.25.1
272 # (it's known to be broken in 2.24 and 2.25; see
273 # https://sourceware.org/bugzilla/show_bug.cgi?id=18383).
274 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether TPOFF relocs with addends are assembled correctly" >&5
275 printf %s "checking whether TPOFF relocs with addends are assembled correctly... " >&6; }
276 if test ${libc_cv_arm_tpoff_addend+y}
278 printf %s "(cached) " >&6
281 cat > conftest.s <<\EOF
290 .section .tdata,"awT",%progbits
295 libc_cv_arm_tpoff_addend=no
296 ${CC-cc} -c $CFLAGS $CPPFLAGS \
297 -o conftest.o conftest.s 1>&5 2>&5 &&
298 LC_ALL=C $READELF -x.text conftest.o > conftest.x 2>&5 &&
301 $AWK 'BEGIN { result = 2 }
302 $1 ~ /0x0+/ && $2 ~ /[0-9a-f]+/ {
303 # Check for little-endian or big-endian encoding of 4 in the in-place addend.
304 result = ($2 == "04000000" || $2 == "00000004") ? 0 : 1
307 ' conftest.x 2>&5 && libc_cv_arm_tpoff_addend=yes
311 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_arm_tpoff_addend" >&5
312 printf "%s\n" "$libc_cv_arm_tpoff_addend" >&6; }
313 if test $libc_cv_arm_tpoff_addend = no; then
314 config_vars="$config_vars
315 test-xfail-tst-tlsalign = yes"
316 config_vars="$config_vars
317 test-xfail-tst-tlsalign-static = yes"
321 libc_cv_gcc_unwind_find_fde=no
323 # Remove -fno-unwind-tables that was added in sysdeps/arm/preconfigure.ac.
324 CFLAGS=${CFLAGS% -fno-unwind-tables}