Bug 1298569 - Part 1. Add NEON_FLAGS for arm32. r?glandium
aarch64 doesn't require compiler flag when using NEON. To use NEON on aarch64 with BUILD_ARM_NEON, we should move NEON's flags to NEON_FLAGS like SSE2_FLAGS.
MozReview-Commit-ID: PGDjcHdTfH
--- a/build/autoconf/arch.m4
+++ b/build/autoconf/arch.m4
@@ -197,16 +197,17 @@ if test -n "$all_flags"; then
if test -n "$thumb_flag"; then
LDFLAGS="$LDFLAGS $thumb_flag"
fi
fi
AC_SUBST(MOZ_THUMB2)
if test "$CPU_ARCH" = "arm"; then
+ NEON_FLAGS="-mfpu=neon"
AC_MSG_CHECKING(for ARM SIMD support in compiler)
# We try to link so that this also fails when
# building with LTO.
AC_TRY_LINK([],
[asm("uqadd8 r1, r1, r2");],
result="yes", result="no")
AC_MSG_RESULT("$result")
if test "$result" = "yes"; then
@@ -243,10 +244,11 @@ if test "$CPU_ARCH" = "arm"; then
fi
fi # CPU_ARCH = arm
AC_SUBST(HAVE_ARM_SIMD)
AC_SUBST(HAVE_ARM_NEON)
AC_SUBST(BUILD_ARM_NEON)
AC_SUBST(ARM_ARCH)
+AC_SUBST_LIST(NEON_FLAGS)
])