@@ -134,13 +134,19 @@
" %{!mbig-endian:%{!mlittle-endian:" ENDIAN_SPEC "}}" \
" %{!mabi=*:" ABI_SPEC "}"
+#ifdef HAVE_AS_MABI_OPTION
+#define ASM_MABI_SPEC "%{mabi=*:-mabi=%*}"
+#else
+#define ASM_MABI_SPEC "%{mabi=lp64*:}"
+#endif
+
#ifndef ASM_SPEC
#define ASM_SPEC "\
%{mbig-endian:-EB} \
%{mlittle-endian:-EL} \
%{mcpu=*:-mcpu=%*} \
-%{march=*:-march=%*} \
-%{mabi=*:-mabi=%*}"
+%{march=*:-march=%*}" \
+ASM_MABI_SPEC
#endif
#undef TYPE_OPERAND_FMT
@@ -5186,6 +5186,10 @@ aarch64_override_options (void)
{
aarch64_parse_tune ();
}
+#ifndef HAVE_AS_MABI_OPTION
+ if (TARGET_ILP32)
+ error ("Assembler does not supprt -mabi=ilp32");
+#endif
initialize_aarch64_code_model ();
@@ -3532,6 +3532,19 @@ case "$target" in
[Define if your assembler supports the -no-mul-bug-abort option.])])
;;
+ aarch64*-*-*)
+ gcc_GAS_CHECK_FEATURE([-mabi option],
+ gcc_cv_as_aarch64_mabi,,
+ [-mabi=lp64], [.text],,,)
+ if test $gcc_cv_as_aarch64_mabi = yes ; then
+ AC_DEFINE(HAVE_AS_MABI_OPTION, 1,
+ [Define if your assembler supports the -mabi option.])
+ fi
+ if test x$gcc_cv_as_aarch64_mabi = xno && test x$with_abi = xilp32; then
+ AC_MSG_ERROR([Assembler doesnot support -mabi=ilp32. Upgrade the Assembler.])
+ fi
+ ;;
+
sparc*-*-*)
gcc_GAS_CHECK_FEATURE([.register], gcc_cv_as_sparc_register_op,,,
[.register %g2, #scratch],,
@@ -3735,6 +3735,15 @@ removed and the system libunwind library will always be used.
@html
<hr />
+@end html
+@anchor{aarch64-x-x}
+@heading aarch64-*-*
+Pre 2.24 binutils does not have support for selecting -mabi and does not
+support ILP32. If GCC 4.9 or later is built with pre 2.24, GCC will not
+support option -mabi=ilp32.
+
+@html
+<hr />
<!-- rs6000-ibm-aix*, powerpc-ibm-aix* -->
@end html
@anchor{x-ibm-aix}