Bug 1298569 - Part 1. Add NEON_FLAGS for arm32. r?glandium draft
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Sat, 27 Aug 2016 14:23:22 +0900
changeset 411539 28dc5aa751aa75240654e79f8a3ada8df744be0f
parent 411433 77940cbf0c2a9f52c209fbbde5b2e7d4c74a1501
child 411540 14e7c7bf1adfaf9ac48e4c94212dbeda4a6c3609
push id28920
push userbmo:m_kato@ga2.so-net.ne.jp
push dateThu, 08 Sep 2016 08:30:32 +0000
reviewersglandium
bugs1298569
milestone51.0a1
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
build/autoconf/arch.m4
--- 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)
 
 ])