@@ -16,6 +16,9 @@
/* Define to 1 if the assembler supports .variant_pcs. */
#undef HAVE_AS_VARIANT_PCS
+/* Define to 1 if __getauxval is available. */
+#undef HAVE___GETAUXVAL
+
/* Define to 1 if the target assembler supports thread-local storage. */
#undef HAVE_CC_TLS
@@ -5657,6 +5657,32 @@ $as_echo "#define HAVE_AS_VARIANT_PCS 1" >>confdefs.h
;;
esac
+# Check __getauxval ABI symbol for CPU feature detection.
+case ${target} in
+aarch64*-linux-*)
+ # No link check because the libc may not be present.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __getauxval" >&5
+$as_echo_n "checking for __getauxval... " >&6; }
+if ${libgcc_cv_have___getauxval+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case ${target} in
+ *-linux-gnu*)
+ libgcc_cv_have___getauxval=yes
+ ;;
+ *)
+ libgcc_cv_have___getauxval=no
+ esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgcc_cv_have___getauxval" >&5
+$as_echo "$libgcc_cv_have___getauxval" >&6; }
+ if test x$libgcc_cv_have___getauxval = xyes; then
+
+$as_echo "#define HAVE___GETAUXVAL 1" >>confdefs.h
+
+ fi
+esac
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for init priority support" >&5
$as_echo_n "checking for init priority support... " >&6; }
if ${libgcc_cv_init_priority+:} false; then :
@@ -665,6 +665,25 @@ aarch64*-*-*)
esac])
LIBGCC_CHECK_AS_VARIANT_PCS
+# Check __getauxval ABI symbol for CPU feature detection.
+case ${target} in
+aarch64*-linux-*)
+ # No link check because the libc may not be present.
+ AC_CACHE_CHECK([for __getauxval],
+ [libgcc_cv_have___getauxval],
+ [case ${target} in
+ *-linux-gnu*)
+ libgcc_cv_have___getauxval=yes
+ ;;
+ *)
+ libgcc_cv_have___getauxval=no
+ esac])
+ if test x$libgcc_cv_have___getauxval = xyes; then
+ AC_DEFINE(HAVE___GETAUXVAL, 1,
+ [Define to 1 if __getauxval is available.])
+ fi
+esac
+
dnl Check if as supports RTM instructions.
AC_CACHE_CHECK(for init priority support, libgcc_cv_init_priority, [
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,