aboutsummaryrefslogtreecommitdiff
path: root/libgcc/configure
diff options
context:
space:
mode:
authorAndre Vieira <andre.simoesdiasvieira@arm.com>2020-04-16 10:16:18 +0100
committerAndre Vieira <andre.simoesdiasvieira@arm.com>2020-04-22 17:08:14 +0100
commita69a60c4969cea06c1d44b5e3e4970595041e510 (patch)
tree9d504040a4f9defc495a8c1203a21c89d9847a13 /libgcc/configure
parent163e0d03f2cdc80de4968c4be4694cdaeaf47fcd (diff)
downloadgcc-a69a60c4969cea06c1d44b5e3e4970595041e510.zip
gcc-a69a60c4969cea06c1d44b5e3e4970595041e510.tar.gz
gcc-a69a60c4969cea06c1d44b5e3e4970595041e510.tar.bz2
aarch64: Fix bootstrap with old binutils [PR93053]
As reported in the PR, GCC 10 (and also 9.3.1 but not 9.3.0) fails to build when using older binutils which lack LSE support, because those instructions are used in libgcc. Thanks to Kyrylo's hint, the following patches (hopefully) allow it to build even with older binutils by using .inst directive if LSE support isn't available in the assembler. 2020-04-16 Andre Vieira <andre.simoesdiasvieira@arm.com> Backport from mainline 2020-04-15 Jakub Jelinek <jakub@redhat.com> PR target/93053 * configure.ac (LIBGCC_CHECK_AS_LSE): Add HAVE_AS_LSE checking. * config/aarch64/lse.S: Include auto-target.h, if HAVE_AS_LSE is not defined, use just .arch armv8-a. (B, M, N, OPN): Define. (COMMENT): New .macro. (CAS, CASP, SWP, LDOP): Use .inst directive if HAVE_AS_LSE is not defined. Otherwise, move the operands right after the glue? and comment out operands where the macros are used. * configure: Regenerated. * config.in: Regenerated.
Diffstat (limited to 'libgcc/configure')
-rwxr-xr-xlibgcc/configure40
1 files changed, 40 insertions, 0 deletions
diff --git a/libgcc/configure b/libgcc/configure
index 7962cd9..aac5e5f 100755
--- a/libgcc/configure
+++ b/libgcc/configure
@@ -5385,6 +5385,46 @@ $as_echo "#define HAVE_AS_AVX 1" >>confdefs.h
;;
esac
+
+
+case "${target}" in
+aarch64*-*-*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler supports LSE" >&5
+$as_echo_n "checking if the assembler supports LSE... " >&6; }
+if ${libgcc_cv_as_lse+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+ asm(".arch armv8-a+lse\n\tcas w0, w1, [x2]");
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ libgcc_cv_as_lse=yes
+else
+ libgcc_cv_as_lse=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgcc_cv_as_lse" >&5
+$as_echo "$libgcc_cv_as_lse" >&6; }
+ if test x$libgcc_cv_as_lse = xyes; then
+
+$as_echo "#define HAVE_AS_LSE 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 test "${libgcc_cv_init_priority+set}" = set; then :