1# This file is generated from configure.ac by Autoconf. DO NOT EDIT! 2 # Local configure fragment for sysdeps/aarch64. 3 4# Static PIE is supported. 5$as_echo "#define SUPPORT_STATIC_PIE 1" >>confdefs.h 6 7 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. 15 16 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; } 19if ${ac_cv_path_GREP+:} false; then : 20 $as_echo_n "(cached) " >&6 21else 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 26for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 27do 28 IFS=$as_save_IFS 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 36case `"$ac_path_GREP" --version 2>&1` in 37*GNU*) 38 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; 39*) 40 ac_count=0 41 $as_echo_n 0123456789 >"conftest.in" 42 while : 43 do 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 55 fi 56 # 10*(2^10) chars as input seems more than enough 57 test $ac_count -gt 10 && break 58 done 59 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 60esac 61 62 $ac_path_GREP_found && break 3 63 done 64 done 65 done 66IFS=$as_save_IFS 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 69 fi 70else 71 ac_cv_path_GREP=$GREP 72fi 73 74fi 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" 78 79 80{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 81$as_echo_n "checking for egrep... " >&6; } 82if ${ac_cv_path_EGREP+:} false; then : 83 $as_echo_n "(cached) " >&6 84else 85 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 86 then ac_cv_path_EGREP="$GREP -E" 87 else 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 92for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 93do 94 IFS=$as_save_IFS 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 102case `"$ac_path_EGREP" --version 2>&1` in 103*GNU*) 104 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; 105*) 106 ac_count=0 107 $as_echo_n 0123456789 >"conftest.in" 108 while : 109 do 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 121 fi 122 # 10*(2^10) chars as input seems more than enough 123 test $ac_count -gt 10 && break 124 done 125 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 126esac 127 128 $ac_path_EGREP_found && break 3 129 done 130 done 131 done 132IFS=$as_save_IFS 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 135 fi 136else 137 ac_cv_path_EGREP=$EGREP 138fi 139 140 fi 141fi 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" 145 146 147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for big endian" >&5 148$as_echo_n "checking for big endian... " >&6; } 149if ${libc_cv_aarch64_be+:} false; then : 150 $as_echo_n "(cached) " >&6 151else 152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 153/* end confdefs.h. */ 154#ifdef __AARCH64EB__ 155 yes 156 #endif 157 158_ACEOF 159if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 160 $EGREP "yes" >/dev/null 2>&1; then : 161 libc_cv_aarch64_be=yes 162else 163 libc_cv_aarch64_be=no 164fi 165rm -f conftest* 166 167fi 168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_aarch64_be" >&5 169$as_echo "$libc_cv_aarch64_be" >&6; } 170if test $libc_cv_aarch64_be = yes; then 171 $as_echo "#define HAVE_AARCH64_BE 1" >>confdefs.h 172 173 config_vars="$config_vars 174default-abi = lp64_be" 175else 176 config_vars="$config_vars 177default-abi = lp64" 178fi 179 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; } 185if ${libc_cv_aarch64_bti+:} false; then : 186 $as_echo_n "(cached) " >&6 187else 188 cat > conftest.c <<EOF 189void foo (void) { } 190EOF 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 194 (eval $ac_try) 2>&5 195 ac_status=$? 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 200 (eval $ac_try) 2>&5 201 ac_status=$? 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 206 (eval $ac_try) 2>&5 207 ac_status=$? 208 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 209 test $ac_status = 0; }; } 210 then 211 libc_cv_aarch64_bti=yes 212 fi 213 rm -rf conftest.* 214fi 215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_aarch64_bti" >&5 216$as_echo "$libc_cv_aarch64_bti" >&6; } 217config_vars="$config_vars 218aarch64-bti = $libc_cv_aarch64_bti" 219if test $libc_cv_aarch64_bti = yes; then 220 $as_echo "#define HAVE_AARCH64_BTI 1" >>confdefs.h 221 222fi 223 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; } 231if ${libc_cv_aarch64_pac_ret+:} false; then : 232 $as_echo_n "(cached) " >&6 233else 234 cat > conftest.c <<EOF 235int bar (void); 236int foo (void) { return bar () + 1; } 237EOF 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 241 (eval $ac_try) 2>&5 242 ac_status=$? 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 247 (eval $ac_try) 2>&5 248 ac_status=$? 249 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 250 test $ac_status = 0; }; } 251 then 252 libc_cv_aarch64_pac_ret=yes 253 fi 254 rm -rf conftest.* 255fi 256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_aarch64_pac_ret" >&5 257$as_echo "$libc_cv_aarch64_pac_ret" >&6; } 258if test $libc_cv_aarch64_pac_ret = yes; then 259 $as_echo "#define HAVE_AARCH64_PAC_RET 1" >>confdefs.h 260 261fi 262 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; } 266if ${libc_cv_aarch64_variant_pcs+:} false; then : 267 $as_echo_n "(cached) " >&6 268else 269 cat > conftest.S <<EOF 270.global foo 271.type foo, %function 272.variant_pcs foo 273foo: 274 ret 275.global bar 276.type bar, %function 277bar: 278 b foo 279EOF 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 283 (eval $ac_try) 2>&5 284 ac_status=$? 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 289 (eval $ac_try) 2>&5 290 ac_status=$? 291 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 292 test $ac_status = 0; }; } 293 then 294 libc_cv_aarch64_variant_pcs=yes 295 fi 296 rm -rf conftest.* 297fi 298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_aarch64_variant_pcs" >&5 299$as_echo "$libc_cv_aarch64_variant_pcs" >&6; } 300config_vars="$config_vars 301aarch64-variant-pcs = $libc_cv_aarch64_variant_pcs" 302 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; } 306if ${libc_cv_asm_sve+:} false; then : 307 $as_echo_n "(cached) " >&6 308else 309 cat > conftest.s <<\EOF 310 ptrue p0.b 311EOF 312if { 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 314 (eval $ac_try) 2>&5 315 ac_status=$? 316 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 317 test $ac_status = 0; }; }; then 318 libc_cv_aarch64_sve_asm=yes 319else 320 libc_cv_aarch64_sve_asm=no 321fi 322rm -f conftest* 323fi 324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_sve" >&5 325$as_echo "$libc_cv_asm_sve" >&6; } 326if test $libc_cv_aarch64_sve_asm = yes; then 327 $as_echo "#define HAVE_AARCH64_SVE_ASM 1" >>confdefs.h 328 329fi 330