]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/arm/configure
Remove -fexceptions configure test.
[thirdparty/glibc.git] / sysdeps / arm / configure
1 # This file is generated from configure.ac by Autoconf. DO NOT EDIT!
2 # Local configure fragment for sysdeps/arm.
3
4 $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
5
6
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.
14
15
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
26 do
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=:;;
38 *)
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
60
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
71 fi
72
73 fi
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"
77
78
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
92 do
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=:;;
104 *)
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
126
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
137 fi
138
139 fi
140 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"
144
145
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
156
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
163 fi
164 rm -f conftest*
165
166 fi
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
171
172 config_vars="$config_vars
173 default-abi = hard"
174 else
175 config_vars="$config_vars
176 default-abi = soft"
177 fi
178
179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the build tools support the GNU descriptor TLS scheme" >&5
180 $as_echo_n "checking whether the build tools support the GNU descriptor TLS scheme... " >&6; }
181 if ${libc_cv_arm_tls_desc+:} false; then :
182 $as_echo_n "(cached) " >&6
183 else
184 old_CFLAGS="$CFLAGS"
185 CFLAGS="$CFLAGS -mtls-dialect=gnu2"
186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
187 /* end confdefs.h. */
188 asm (".word\tfoo(tlsdesc)");
189 int
190 main ()
191 {
192
193 ;
194 return 0;
195 }
196 _ACEOF
197 if ac_fn_c_try_compile "$LINENO"; then :
198 libc_cv_arm_tls_desc=yes
199 else
200 libc_cv_arm_tls_desc=no
201 fi
202 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
203 CFLAGS="$old_CFLAGS"
204 fi
205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_arm_tls_desc" >&5
206 $as_echo "$libc_cv_arm_tls_desc" >&6; }
207 if test $libc_cv_arm_tls_desc = yes; then
208 config_vars="$config_vars
209 have-arm-tls-desc = yes"
210 else
211 config_vars="$config_vars
212 have-arm-tls-desc = no"
213 fi
214
215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether PC-relative relocs in movw/movt work properly" >&5
216 $as_echo_n "checking whether PC-relative relocs in movw/movt work properly... " >&6; }
217 if ${libc_cv_arm_pcrel_movw+:} false; then :
218 $as_echo_n "(cached) " >&6
219 else
220
221 cat > conftest.s <<\EOF
222 .syntax unified
223 .arm
224 .arch armv7-a
225
226 .text
227 .globl foo
228 .type foo,%function
229 foo: movw r0, #:lower16:symbol - 1f - 8
230 movt r0, #:upper16:symbol - 1f - 8
231 1: add r0, pc
232 @ And now a case with a local symbol.
233 movw r0, #:lower16:3f - 2f - 8
234 movt r0, #:upper16:3f - 2f - 8
235 2: add r0, pc
236 bx lr
237
238 .data
239 .globl symbol
240 .hidden symbol
241 symbol: .long 23
242 3: .long 17
243 EOF
244 libc_cv_arm_pcrel_movw=no
245 ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \
246 -nostartfiles -nostdlib -shared \
247 -o conftest.so conftest.s 1>&5 2>&5 &&
248 LC_ALL=C $READELF -dr conftest.so > conftest.dr 2>&5 &&
249 {
250 cat conftest.dr 1>&5
251 fgrep 'TEXTREL
252 R_ARM_NONE' conftest.dr > /dev/null || libc_cv_arm_pcrel_movw=yes
253 }
254 rm -f conftest*
255 fi
256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_arm_pcrel_movw" >&5
257 $as_echo "$libc_cv_arm_pcrel_movw" >&6; }
258 if test $libc_cv_arm_pcrel_movw = yes; then
259 $as_echo "#define ARM_PCREL_MOVW_OK 1" >>confdefs.h
260
261 fi
262
263 # This was buggy in assemblers from GNU binutils versions before 2.25.1
264 # (it's known to be broken in 2.24 and 2.25; see
265 # https://sourceware.org/bugzilla/show_bug.cgi?id=18383).
266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether TPOFF relocs with addends are assembled correctly" >&5
267 $as_echo_n "checking whether TPOFF relocs with addends are assembled correctly... " >&6; }
268 if ${libc_cv_arm_tpoff_addend+:} false; then :
269 $as_echo_n "(cached) " >&6
270 else
271
272 cat > conftest.s <<\EOF
273 .syntax unified
274 .arm
275 .arch armv7-a
276
277 .text
278 foo:
279 .word tbase(tpoff)+4
280
281 .section .tdata,"awT",%progbits
282 .word -4
283 tbase: .word 0
284 .word 4
285 EOF
286 libc_cv_arm_tpoff_addend=no
287 ${CC-cc} -c $CFLAGS $CPPFLAGS \
288 -o conftest.o conftest.s 1>&5 2>&5 &&
289 LC_ALL=C $READELF -x.text conftest.o > conftest.x 2>&5 &&
290 {
291 cat conftest.x 1>&5
292 $AWK 'BEGIN { result = 2 }
293 $1 ~ /0x0+/ && $2 ~ /[0-9a-f]+/ {
294 # Check for little-endian or big-endian encoding of 4 in the in-place addend.
295 result = ($2 == "04000000" || $2 == "00000004") ? 0 : 1
296 }
297 END { exit(result) }
298 ' conftest.x 2>&5 && libc_cv_arm_tpoff_addend=yes
299 }
300 rm -f conftest*
301 fi
302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_arm_tpoff_addend" >&5
303 $as_echo "$libc_cv_arm_tpoff_addend" >&6; }
304 if test $libc_cv_arm_tpoff_addend = no; then
305 config_vars="$config_vars
306 test-xfail-tst-tlsalign = yes"
307 config_vars="$config_vars
308 test-xfail-tst-tlsalign-static = yes"
309 fi
310
311
312 libc_cv_gcc_unwind_find_fde=no
313
314 # Remove -fno-unwind-tables that was added in sysdeps/arm/preconfigure.ac.
315 CFLAGS=${CFLAGS% -fno-unwind-tables}