1 # This file is generated from configure.ac by Autoconf. DO NOT EDIT!
2 # Local configure fragment for sysdeps/aarch64.
4 # Static PIE is supported.
5 printf "%s\n" "#define SUPPORT_STATIC_PIE 1" >>confdefs.h
8 # We check to see if the compiler and flags are
9 # selecting the big endian ABI and if they are then
10 # we set libc_cv_aarch64_be to yes which causes
11 # HAVE_AARCH64_BE to be defined in config.h and
12 # in include/libc-symbols.h and thus available to
13 # shlib-versions to select the appropriate name for
14 # the dynamic linker via %ifdef.
17 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
18 printf %s "checking for grep that handles long lines and -e... " >&6; }
19 if test ${ac_cv_path_GREP+y}
21 printf %s "(cached) " >&6
23 if test -z "$GREP"; then
24 ac_path_GREP_found=false
25 # Loop through the user's path and test for each of PROGNAME-LIST
26 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
35 for ac_prog in grep ggrep
37 for ac_exec_ext in '' $ac_executable_extensions; do
38 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
39 as_fn_executable_p "$ac_path_GREP" || continue
40 # Check for GNU ac_path_GREP and select it if it is found.
41 # Check for GNU $ac_path_GREP
42 case `"$ac_path_GREP" --version 2>&1` in
44 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
47 printf %s 0123456789 >"conftest.in"
50 cat "conftest.in" "conftest.in" >"conftest.tmp"
51 mv "conftest.tmp" "conftest.in"
52 cp "conftest.in" "conftest.nl"
53 printf "%s\n" 'GREP' >> "conftest.nl"
54 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
55 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
56 as_fn_arith $ac_count + 1 && ac_count=$as_val
57 if test $ac_count -gt ${ac_path_GREP_max-0}; then
58 # Best one so far, save it but keep looking for a better one
59 ac_cv_path_GREP="$ac_path_GREP"
60 ac_path_GREP_max=$ac_count
62 # 10*(2^10) chars as input seems more than enough
63 test $ac_count -gt 10 && break
65 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
68 $ac_path_GREP_found && break 3
73 if test -z "$ac_cv_path_GREP"; then
74 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
82 printf "%s\n" "$ac_cv_path_GREP" >&6; }
83 GREP="$ac_cv_path_GREP"
86 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
87 printf %s "checking for egrep... " >&6; }
88 if test ${ac_cv_path_EGREP+y}
90 printf %s "(cached) " >&6
92 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
93 then ac_cv_path_EGREP="$GREP -E"
95 if test -z "$EGREP"; then
96 ac_path_EGREP_found=false
97 # Loop through the user's path and test for each of PROGNAME-LIST
98 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
99 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
105 *) as_dir=$as_dir/ ;;
109 for ac_exec_ext in '' $ac_executable_extensions; do
110 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
111 as_fn_executable_p "$ac_path_EGREP" || continue
112 # Check for GNU ac_path_EGREP and select it if it is found.
113 # Check for GNU $ac_path_EGREP
114 case `"$ac_path_EGREP" --version 2>&1` in
116 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
119 printf %s 0123456789 >"conftest.in"
122 cat "conftest.in" "conftest.in" >"conftest.tmp"
123 mv "conftest.tmp" "conftest.in"
124 cp "conftest.in" "conftest.nl"
125 printf "%s\n" 'EGREP' >> "conftest.nl"
126 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
127 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
128 as_fn_arith $ac_count + 1 && ac_count=$as_val
129 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
130 # Best one so far, save it but keep looking for a better one
131 ac_cv_path_EGREP="$ac_path_EGREP"
132 ac_path_EGREP_max=$ac_count
134 # 10*(2^10) chars as input seems more than enough
135 test $ac_count -gt 10 && break
137 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
140 $ac_path_EGREP_found && break 3
145 if test -z "$ac_cv_path_EGREP"; then
146 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
149 ac_cv_path_EGREP=$EGREP
154 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
155 printf "%s\n" "$ac_cv_path_EGREP" >&6; }
156 EGREP="$ac_cv_path_EGREP"
159 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for big endian" >&5
160 printf %s "checking for big endian... " >&6; }
161 if test ${libc_cv_aarch64_be+y}
163 printf %s "(cached) " >&6
165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
166 /* end confdefs.h. */
172 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
173 $EGREP "yes" >/dev/null 2>&1
175 libc_cv_aarch64_be=yes
177 libc_cv_aarch64_be=no
182 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_aarch64_be" >&5
183 printf "%s\n" "$libc_cv_aarch64_be" >&6; }
184 if test $libc_cv_aarch64_be = yes; then
185 printf "%s\n" "#define HAVE_AARCH64_BE 1" >>confdefs.h
187 config_vars="$config_vars
188 default-abi = lp64_be"
190 config_vars="$config_vars
194 # Only consider BTI supported if -mbranch-protection=bti is
195 # on by default in the compiler and the linker produces
196 # binaries with GNU property notes in PT_GNU_PROPERTY segment.
197 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BTI support" >&5
198 printf %s "checking for BTI support... " >&6; }
199 if test ${libc_cv_aarch64_bti+y}
201 printf %s "(cached) " >&6
203 cat > conftest.c <<EOF
206 libc_cv_aarch64_bti=no
207 if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -nostdlib -nostartfiles $no_ssp -shared -fPIC -o conftest.so conftest.c'
208 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
211 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
212 test $ac_status = 0; }; } \
213 && { ac_try='$READELF -lW conftest.so | grep -q GNU_PROPERTY'
214 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
217 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
218 test $ac_status = 0; }; } \
219 && { ac_try='$READELF -nW conftest.so | grep -q "NT_GNU_PROPERTY_TYPE_0.*AArch64 feature:.* BTI"'
220 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
223 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
224 test $ac_status = 0; }; }
226 libc_cv_aarch64_bti=yes
230 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_aarch64_bti" >&5
231 printf "%s\n" "$libc_cv_aarch64_bti" >&6; }
232 config_vars="$config_vars
233 aarch64-bti = $libc_cv_aarch64_bti"
234 if test $libc_cv_aarch64_bti = yes; then
235 printf "%s\n" "#define HAVE_AARCH64_BTI 1" >>confdefs.h
239 # Check if glibc is built with return address signing, i.e.
240 # if -mbranch-protection=pac-ret is on. We need this because
241 # pac-ret relies on unwinder support so it's not safe to use
242 # it in assembly code unconditionally, but there is no
243 # feature test macro for it in gcc.
244 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if pac-ret is enabled" >&5
245 printf %s "checking if pac-ret is enabled... " >&6; }
246 if test ${libc_cv_aarch64_pac_ret+y}
248 printf %s "(cached) " >&6
250 cat > conftest.c <<EOF
252 int foo (void) { return bar () + 1; }
254 libc_cv_aarch64_pac_ret=no
255 if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -S -o conftest.s conftest.c'
256 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
259 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
260 test $ac_status = 0; }; } \
261 && { ac_try='grep -q -E '\''(hint( | )+25|paciasp)'\'' conftest.s'
262 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
265 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
266 test $ac_status = 0; }; }
268 libc_cv_aarch64_pac_ret=yes
272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_aarch64_pac_ret" >&5
273 printf "%s\n" "$libc_cv_aarch64_pac_ret" >&6; }
274 if test $libc_cv_aarch64_pac_ret = yes; then
275 printf "%s\n" "#define HAVE_AARCH64_PAC_RET 1" >>confdefs.h
279 # Check if binutils supports variant PCS symbols.
280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for variant PCS support" >&5
281 printf %s "checking for variant PCS support... " >&6; }
282 if test ${libc_cv_aarch64_variant_pcs+y}
284 printf %s "(cached) " >&6
286 cat > conftest.S <<EOF
297 libc_cv_aarch64_variant_pcs=no
298 if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -nostdlib -nostartfiles $no_ssp -shared -fPIC -o conftest.so conftest.S'
299 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
302 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
303 test $ac_status = 0; }; } \
304 && { ac_try='$READELF -dW conftest.so | grep -q AARCH64_VARIANT_PCS'
305 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
308 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
309 test $ac_status = 0; }; }
311 libc_cv_aarch64_variant_pcs=yes
315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_aarch64_variant_pcs" >&5
316 printf "%s\n" "$libc_cv_aarch64_variant_pcs" >&6; }
317 config_vars="$config_vars
318 aarch64-variant-pcs = $libc_cv_aarch64_variant_pcs"
320 # Check if asm support armv8.2-a+sve
321 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SVE support in assembler" >&5
322 printf %s "checking for SVE support in assembler... " >&6; }
323 if test ${libc_cv_aarch64_sve_asm+y}
325 printf %s "(cached) " >&6
327 cat > conftest.s <<\EOF
330 if { ac_try='${CC-cc} -c -march=armv8.2-a+sve conftest.s 1>&5'
331 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
334 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
335 test $ac_status = 0; }; }; then
336 libc_cv_aarch64_sve_asm=yes
338 libc_cv_aarch64_sve_asm=no
342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_aarch64_sve_asm" >&5
343 printf "%s\n" "$libc_cv_aarch64_sve_asm" >&6; }
344 if test $libc_cv_aarch64_sve_asm = yes; then
345 printf "%s\n" "#define HAVE_AARCH64_SVE_ASM 1" >>confdefs.h
349 if test x"$build_mathvec" = xnotset; then
353 # Check if compiler supports SVE ACLE.
354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for availability of SVE ACLE" >&5
355 printf %s "checking for availability of SVE ACLE... " >&6; }
356 if test ${libc_cv_aarch64_sve_acle+y}
358 printf %s "(cached) " >&6
360 cat > conftest.c <<EOF
363 if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -fsyntax-only -ffreestanding conftest.c'
364 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
367 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
368 test $ac_status = 0; }; }; then
369 libc_cv_aarch64_sve_acle=yes
371 libc_cv_aarch64_sve_acle=no
375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_aarch64_sve_acle" >&5
376 printf "%s\n" "$libc_cv_aarch64_sve_acle" >&6; }
378 # Check if compiler is sufficient to build mathvec
379 if test $build_mathvec = yes; then
381 if test $libc_cv_aarch64_variant_pcs = no; then
383 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: mathvec is enabled but linker does not support variant PCS." >&5
384 printf "%s\n" "$as_me: WARNING: mathvec is enabled but linker does not support variant PCS." >&2;}
386 if test $libc_cv_aarch64_sve_asm = no; then
388 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: mathvec is enabled but assembler does not support SVE." >&5
389 printf "%s\n" "$as_me: WARNING: mathvec is enabled but assembler does not support SVE." >&2;}
391 if test $libc_cv_aarch64_sve_acle = no; then
393 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: mathvec is enabled but compiler does not have SVE ACLE." >&5
394 printf "%s\n" "$as_me: WARNING: mathvec is enabled but compiler does not have SVE ACLE." >&2;}
396 if test $fail = yes; then
397 as_fn_error $? "use a compatible toolchain or configure with --disable-mathvec (this results in incomplete ABI)." "$LINENO" 5
400 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: mathvec is disabled, this results in incomplete ABI." >&5
401 printf "%s\n" "$as_me: WARNING: mathvec is disabled, this results in incomplete ABI." >&2;}