1 # This file is generated from configure.ac by Autoconf. DO NOT EDIT!
2 # Local configure fragment for sysdeps/aarch64.
4 # Static and hidden objects are accessed without dynamic relocations.
5 # The exception is -mcmodel=large which is unsupported with PIC/PIE.
6 $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
9 # Static PIE is supported.
10 $as_echo "#define SUPPORT_STATIC_PIE 1" >>confdefs.h
13 # We check to see if the compiler and flags are
14 # selecting the big endian ABI and if they are then
15 # we set libc_cv_aarch64_be to yes which causes
16 # HAVE_AARCH64_BE to be defined in config.h and
17 # in include/libc-symbols.h and thus available to
18 # shlib-versions to select the appropriate name for
19 # the dynamic linker via %ifdef.
22 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
23 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
24 if ${ac_cv_path_GREP+:} false; then :
25 $as_echo_n "(cached) " >&6
27 if test -z "$GREP"; then
28 ac_path_GREP_found=false
29 # Loop through the user's path and test for each of PROGNAME-LIST
30 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
34 test -z "$as_dir" && as_dir=.
35 for ac_prog in grep ggrep; do
36 for ac_exec_ext in '' $ac_executable_extensions; do
37 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
38 as_fn_executable_p "$ac_path_GREP" || continue
39 # Check for GNU ac_path_GREP and select it if it is found.
40 # Check for GNU $ac_path_GREP
41 case `"$ac_path_GREP" --version 2>&1` in
43 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
46 $as_echo_n 0123456789 >"conftest.in"
49 cat "conftest.in" "conftest.in" >"conftest.tmp"
50 mv "conftest.tmp" "conftest.in"
51 cp "conftest.in" "conftest.nl"
52 $as_echo 'GREP' >> "conftest.nl"
53 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
54 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
55 as_fn_arith $ac_count + 1 && ac_count=$as_val
56 if test $ac_count -gt ${ac_path_GREP_max-0}; then
57 # Best one so far, save it but keep looking for a better one
58 ac_cv_path_GREP="$ac_path_GREP"
59 ac_path_GREP_max=$ac_count
61 # 10*(2^10) chars as input seems more than enough
62 test $ac_count -gt 10 && break
64 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
67 $ac_path_GREP_found && break 3
72 if test -z "$ac_cv_path_GREP"; then
73 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
80 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
81 $as_echo "$ac_cv_path_GREP" >&6; }
82 GREP="$ac_cv_path_GREP"
85 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
86 $as_echo_n "checking for egrep... " >&6; }
87 if ${ac_cv_path_EGREP+:} false; then :
88 $as_echo_n "(cached) " >&6
90 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
91 then ac_cv_path_EGREP="$GREP -E"
93 if test -z "$EGREP"; then
94 ac_path_EGREP_found=false
95 # Loop through the user's path and test for each of PROGNAME-LIST
96 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
100 test -z "$as_dir" && as_dir=.
101 for ac_prog in egrep; do
102 for ac_exec_ext in '' $ac_executable_extensions; do
103 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
104 as_fn_executable_p "$ac_path_EGREP" || continue
105 # Check for GNU ac_path_EGREP and select it if it is found.
106 # Check for GNU $ac_path_EGREP
107 case `"$ac_path_EGREP" --version 2>&1` in
109 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
112 $as_echo_n 0123456789 >"conftest.in"
115 cat "conftest.in" "conftest.in" >"conftest.tmp"
116 mv "conftest.tmp" "conftest.in"
117 cp "conftest.in" "conftest.nl"
118 $as_echo 'EGREP' >> "conftest.nl"
119 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
120 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
121 as_fn_arith $ac_count + 1 && ac_count=$as_val
122 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
123 # Best one so far, save it but keep looking for a better one
124 ac_cv_path_EGREP="$ac_path_EGREP"
125 ac_path_EGREP_max=$ac_count
127 # 10*(2^10) chars as input seems more than enough
128 test $ac_count -gt 10 && break
130 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
133 $ac_path_EGREP_found && break 3
138 if test -z "$ac_cv_path_EGREP"; then
139 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
142 ac_cv_path_EGREP=$EGREP
147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
148 $as_echo "$ac_cv_path_EGREP" >&6; }
149 EGREP="$ac_cv_path_EGREP"
152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for big endian" >&5
153 $as_echo_n "checking for big endian... " >&6; }
154 if ${libc_cv_aarch64_be+:} false; then :
155 $as_echo_n "(cached) " >&6
157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
158 /* end confdefs.h. */
164 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
165 $EGREP "yes" >/dev/null 2>&1; then :
166 libc_cv_aarch64_be=yes
168 libc_cv_aarch64_be=no
173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_aarch64_be" >&5
174 $as_echo "$libc_cv_aarch64_be" >&6; }
175 if test $libc_cv_aarch64_be = yes; then
176 $as_echo "#define HAVE_AARCH64_BE 1" >>confdefs.h
178 config_vars="$config_vars
179 default-abi = lp64_be"
181 config_vars="$config_vars
185 # Only consider BTI supported if -mbranch-protection=bti is
186 # on by default in the compiler and the linker produces
187 # binaries with GNU property notes in PT_GNU_PROPERTY segment.
188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BTI support" >&5
189 $as_echo_n "checking for BTI support... " >&6; }
190 if ${libc_cv_aarch64_bti+:} false; then :
191 $as_echo_n "(cached) " >&6
193 cat > conftest.c <<EOF
196 libc_cv_aarch64_bti=no
197 if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -nostdlib -nostartfiles $no_ssp -shared -fPIC -o conftest.so conftest.c'
198 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
201 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
202 test $ac_status = 0; }; } \
203 && { ac_try='$READELF -lW conftest.so | grep -q GNU_PROPERTY'
204 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
207 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
208 test $ac_status = 0; }; } \
209 && { ac_try='$READELF -nW conftest.so | grep -q "NT_GNU_PROPERTY_TYPE_0.*AArch64 feature:.* BTI"'
210 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
213 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
214 test $ac_status = 0; }; }
216 libc_cv_aarch64_bti=yes
220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_aarch64_bti" >&5
221 $as_echo "$libc_cv_aarch64_bti" >&6; }
222 config_vars="$config_vars
223 aarch64-bti = $libc_cv_aarch64_bti"
224 if test $libc_cv_aarch64_bti = yes; then
225 $as_echo "#define HAVE_AARCH64_BTI 1" >>confdefs.h
229 # Check if glibc is built with return address signing, i.e.
230 # if -mbranch-protection=pac-ret is on. We need this because
231 # pac-ret relies on unwinder support so it's not safe to use
232 # it in assembly code unconditionally, but there is no
233 # feature test macro for it in gcc.
234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pac-ret is enabled" >&5
235 $as_echo_n "checking if pac-ret is enabled... " >&6; }
236 if ${libc_cv_aarch64_pac_ret+:} false; then :
237 $as_echo_n "(cached) " >&6
239 cat > conftest.c <<EOF
241 int foo (void) { return bar () + 1; }
243 libc_cv_aarch64_pac_ret=no
244 if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -S -o conftest.s conftest.c'
245 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
248 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
249 test $ac_status = 0; }; } \
250 && { ac_try='grep -q -E '\''(hint( | )+25|paciasp)'\'' conftest.s'
251 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
254 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
255 test $ac_status = 0; }; }
257 libc_cv_aarch64_pac_ret=yes
261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_aarch64_pac_ret" >&5
262 $as_echo "$libc_cv_aarch64_pac_ret" >&6; }
263 if test $libc_cv_aarch64_pac_ret = yes; then
264 $as_echo "#define HAVE_AARCH64_PAC_RET 1" >>confdefs.h
268 # Check if binutils supports variant PCS symbols.
269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for variant PCS support" >&5
270 $as_echo_n "checking for variant PCS support... " >&6; }
271 if ${libc_cv_aarch64_variant_pcs+:} false; then :
272 $as_echo_n "(cached) " >&6
274 cat > conftest.S <<EOF
285 libc_cv_aarch64_variant_pcs=no
286 if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -nostdlib -nostartfiles $no_ssp -shared -fPIC -o conftest.so conftest.S'
287 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
290 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
291 test $ac_status = 0; }; } \
292 && { ac_try='$READELF -dW conftest.so | grep -q AARCH64_VARIANT_PCS'
293 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
296 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
297 test $ac_status = 0; }; }
299 libc_cv_aarch64_variant_pcs=yes
303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_aarch64_variant_pcs" >&5
304 $as_echo "$libc_cv_aarch64_variant_pcs" >&6; }
305 config_vars="$config_vars
306 aarch64-variant-pcs = $libc_cv_aarch64_variant_pcs"
308 # Check if asm support armv8.2-a+sve
309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SVE support in assembler" >&5
310 $as_echo_n "checking for SVE support in assembler... " >&6; }
311 if ${libc_cv_asm_sve+:} false; then :
312 $as_echo_n "(cached) " >&6
314 cat > conftest.s <<\EOF
317 if { ac_try='${CC-cc} -c -march=armv8.2-a+sve conftest.s 1>&5'
318 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
321 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
322 test $ac_status = 0; }; }; then
323 libc_cv_aarch64_sve_asm=yes
325 libc_cv_aarch64_sve_asm=no
329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_sve" >&5
330 $as_echo "$libc_cv_asm_sve" >&6; }
331 if test $libc_cv_aarch64_sve_asm = yes; then
332 $as_echo "#define HAVE_AARCH64_SVE_ASM 1" >>confdefs.h