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 $as_echo "#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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
18 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
19 if ${ac_cv_path_GREP+:} false; then :
20 $as_echo_n "(cached) " >&6
22 if test -z "$GREP"; then
23 ac_path_GREP_found=false
24 # Loop through the user's path and test for each of PROGNAME-LIST
25 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
29 test -z "$as_dir" && as_dir=.
30 for ac_prog in grep ggrep; do
31 for ac_exec_ext in '' $ac_executable_extensions; do
32 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
33 as_fn_executable_p "$ac_path_GREP" || continue
34 # Check for GNU ac_path_GREP and select it if it is found.
35 # Check for GNU $ac_path_GREP
36 case `"$ac_path_GREP" --version 2>&1` in
38 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
41 $as_echo_n 0123456789 >"conftest.in"
44 cat "conftest.in" "conftest.in" >"conftest.tmp"
45 mv "conftest.tmp" "conftest.in"
46 cp "conftest.in" "conftest.nl"
47 $as_echo 'GREP' >> "conftest.nl"
48 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
49 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
50 as_fn_arith $ac_count + 1 && ac_count=$as_val
51 if test $ac_count -gt ${ac_path_GREP_max-0}; then
52 # Best one so far, save it but keep looking for a better one
53 ac_cv_path_GREP="$ac_path_GREP"
54 ac_path_GREP_max=$ac_count
56 # 10*(2^10) chars as input seems more than enough
57 test $ac_count -gt 10 && break
59 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
62 $ac_path_GREP_found && break 3
67 if test -z "$ac_cv_path_GREP"; then
68 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
75 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
76 $as_echo "$ac_cv_path_GREP" >&6; }
77 GREP="$ac_cv_path_GREP"
80 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
81 $as_echo_n "checking for egrep... " >&6; }
82 if ${ac_cv_path_EGREP+:} false; then :
83 $as_echo_n "(cached) " >&6
85 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
86 then ac_cv_path_EGREP="$GREP -E"
88 if test -z "$EGREP"; then
89 ac_path_EGREP_found=false
90 # Loop through the user's path and test for each of PROGNAME-LIST
91 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
92 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
95 test -z "$as_dir" && as_dir=.
96 for ac_prog in egrep; do
97 for ac_exec_ext in '' $ac_executable_extensions; do
98 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
99 as_fn_executable_p "$ac_path_EGREP" || continue
100 # Check for GNU ac_path_EGREP and select it if it is found.
101 # Check for GNU $ac_path_EGREP
102 case `"$ac_path_EGREP" --version 2>&1` in
104 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
107 $as_echo_n 0123456789 >"conftest.in"
110 cat "conftest.in" "conftest.in" >"conftest.tmp"
111 mv "conftest.tmp" "conftest.in"
112 cp "conftest.in" "conftest.nl"
113 $as_echo 'EGREP' >> "conftest.nl"
114 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
115 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
116 as_fn_arith $ac_count + 1 && ac_count=$as_val
117 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
118 # Best one so far, save it but keep looking for a better one
119 ac_cv_path_EGREP="$ac_path_EGREP"
120 ac_path_EGREP_max=$ac_count
122 # 10*(2^10) chars as input seems more than enough
123 test $ac_count -gt 10 && break
125 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
128 $ac_path_EGREP_found && break 3
133 if test -z "$ac_cv_path_EGREP"; then
134 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
137 ac_cv_path_EGREP=$EGREP
142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
143 $as_echo "$ac_cv_path_EGREP" >&6; }
144 EGREP="$ac_cv_path_EGREP"
147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for big endian" >&5
148 $as_echo_n "checking for big endian... " >&6; }
149 if ${libc_cv_aarch64_be+:} false; then :
150 $as_echo_n "(cached) " >&6
152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
153 /* end confdefs.h. */
159 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
160 $EGREP "yes" >/dev/null 2>&1; then :
161 libc_cv_aarch64_be=yes
163 libc_cv_aarch64_be=no
168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_aarch64_be" >&5
169 $as_echo "$libc_cv_aarch64_be" >&6; }
170 if test $libc_cv_aarch64_be = yes; then
171 $as_echo "#define HAVE_AARCH64_BE 1" >>confdefs.h
173 config_vars="$config_vars
174 default-abi = lp64_be"
176 config_vars="$config_vars
180 # Only consider BTI supported if -mbranch-protection=bti is
181 # on by default in the compiler and the linker produces
182 # binaries with GNU property notes in PT_GNU_PROPERTY segment.
183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BTI support" >&5
184 $as_echo_n "checking for BTI support... " >&6; }
185 if ${libc_cv_aarch64_bti+:} false; then :
186 $as_echo_n "(cached) " >&6
188 cat > conftest.c <<EOF
191 libc_cv_aarch64_bti=no
192 if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -nostdlib -nostartfiles $no_ssp -shared -fPIC -o conftest.so conftest.c'
193 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
196 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
197 test $ac_status = 0; }; } \
198 && { ac_try='$READELF -lW conftest.so | grep -q GNU_PROPERTY'
199 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
202 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
203 test $ac_status = 0; }; } \
204 && { ac_try='$READELF -nW conftest.so | grep -q "NT_GNU_PROPERTY_TYPE_0.*AArch64 feature:.* BTI"'
205 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
208 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
209 test $ac_status = 0; }; }
211 libc_cv_aarch64_bti=yes
215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_aarch64_bti" >&5
216 $as_echo "$libc_cv_aarch64_bti" >&6; }
217 config_vars="$config_vars
218 aarch64-bti = $libc_cv_aarch64_bti"
219 if test $libc_cv_aarch64_bti = yes; then
220 $as_echo "#define HAVE_AARCH64_BTI 1" >>confdefs.h
224 # Check if glibc is built with return address signing, i.e.
225 # if -mbranch-protection=pac-ret is on. We need this because
226 # pac-ret relies on unwinder support so it's not safe to use
227 # it in assembly code unconditionally, but there is no
228 # feature test macro for it in gcc.
229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pac-ret is enabled" >&5
230 $as_echo_n "checking if pac-ret is enabled... " >&6; }
231 if ${libc_cv_aarch64_pac_ret+:} false; then :
232 $as_echo_n "(cached) " >&6
234 cat > conftest.c <<EOF
236 int foo (void) { return bar () + 1; }
238 libc_cv_aarch64_pac_ret=no
239 if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -S -o conftest.s conftest.c'
240 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
243 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
244 test $ac_status = 0; }; } \
245 && { ac_try='grep -q -E '\''(hint( | )+25|paciasp)'\'' conftest.s'
246 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
249 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
250 test $ac_status = 0; }; }
252 libc_cv_aarch64_pac_ret=yes
256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_aarch64_pac_ret" >&5
257 $as_echo "$libc_cv_aarch64_pac_ret" >&6; }
258 if test $libc_cv_aarch64_pac_ret = yes; then
259 $as_echo "#define HAVE_AARCH64_PAC_RET 1" >>confdefs.h
263 # Check if binutils supports variant PCS symbols.
264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for variant PCS support" >&5
265 $as_echo_n "checking for variant PCS support... " >&6; }
266 if ${libc_cv_aarch64_variant_pcs+:} false; then :
267 $as_echo_n "(cached) " >&6
269 cat > conftest.S <<EOF
280 libc_cv_aarch64_variant_pcs=no
281 if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -nostdlib -nostartfiles $no_ssp -shared -fPIC -o conftest.so conftest.S'
282 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
285 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
286 test $ac_status = 0; }; } \
287 && { ac_try='$READELF -dW conftest.so | grep -q AARCH64_VARIANT_PCS'
288 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
291 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
292 test $ac_status = 0; }; }
294 libc_cv_aarch64_variant_pcs=yes
298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_aarch64_variant_pcs" >&5
299 $as_echo "$libc_cv_aarch64_variant_pcs" >&6; }
300 config_vars="$config_vars
301 aarch64-variant-pcs = $libc_cv_aarch64_variant_pcs"
303 # Check if asm support armv8.2-a+sve
304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SVE support in assembler" >&5
305 $as_echo_n "checking for SVE support in assembler... " >&6; }
306 if ${libc_cv_aarch64_sve_asm+:} false; then :
307 $as_echo_n "(cached) " >&6
309 cat > conftest.s <<\EOF
312 if { ac_try='${CC-cc} -c -march=armv8.2-a+sve conftest.s 1>&5'
313 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
316 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
317 test $ac_status = 0; }; }; then
318 libc_cv_aarch64_sve_asm=yes
320 libc_cv_aarch64_sve_asm=no
324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_aarch64_sve_asm" >&5
325 $as_echo "$libc_cv_aarch64_sve_asm" >&6; }
326 if test $libc_cv_aarch64_sve_asm = yes; then
327 $as_echo "#define HAVE_AARCH64_SVE_ASM 1" >>confdefs.h
331 if test x"$build_mathvec" = xnotset; then
335 # Check if compiler is sufficient to build mathvec (needs SVE ACLE)
336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for availability of SVE ACLE" >&5
337 $as_echo_n "checking for availability of SVE ACLE... " >&6; }
338 if ${libc_cv_has_sve_acle+:} false; then :
339 $as_echo_n "(cached) " >&6
341 if test $build_mathvec = yes; then
342 cat > conftest.c <<EOF
345 if ! ${CC-cc} conftest.c -fsyntax-only; then
346 as_fn_error 1 "mathvec is enabled but compiler does not have SVE ACLE. Either use a compatible compiler or configure with --disable-mathvec (this results in incomplete ABI)."
351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_has_sve_acle" >&5
352 $as_echo "$libc_cv_has_sve_acle" >&6; }