Clang from LLVM 13.0.0 caused a segumentation fault if an unknown
architecture is supplied through -march. While this has been fixed in
13.0.1, until it is widely deployed this adds a configure check as a
safeguard:
https://github.com/llvm/llvm-project/commit/
d31f8cc6884ba3cc3e088fd57c4c533868e8a8b2
Signed-off-by: Daiki Ueno <ueno@gnu.org>
;;
esac
+# Check if the assembler supports -march=all
+if test "$hw_accel" = aarch64; then
+ AARCH64_CCASFLAGS="-Wa,-march=all"
+ AC_MSG_CHECKING([whether the compiler supports -Wa,-march=all])
+ : > conftest.s
+ if "$CCAS" "$AARCH64_CCASFLAGS" -c conftest.s >/dev/null 2>&1; then
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ AARCH64_CCASFLAGS=
+ fi
+ AC_SUBST(AARCH64_CCASFLAGS)
+fi
+
# check for gcc's __get_cpuid_count functionality
AC_MSG_CHECKING([for __get_cpuid_count])
AC_LINK_IFELSE(
endif
#ensure that we have all aarch64 instruction sets enabled for the assembler
-AM_CCASFLAGS = -Wa,-march=all
+AM_CCASFLAGS = $(AARCH64_CCASFLAGS)
EXTRA_DIST = README