Bug 1465731 - Fix armv6 build. r=glandiumd
authorGuillaume GARDET <guillaume.gardet@arm.com>
Mon, 16 Jul 2018 03:18:00 +0300
changeset 487884 34ab0ef2419d31981551a98398efe10f4cc3d705
parent 487883 650ac3a6c73de80182fca223666e3f7595e1676e
child 487885 1b41309fe5d6f6de409350146c6a3add0b65a950
push id246
push userfmarier@mozilla.com
push dateSat, 13 Oct 2018 00:15:40 +0000
reviewersglandiumd
bugs1465731
milestone64.0a1
Bug 1465731 - Fix armv6 build. r=glandiumd ARM_ARCH setting is broken in build/autoconf/arch.m4 file, when multiple lines match the pattern. So, keep the 1st line only.
build/autoconf/arch.m4
--- a/build/autoconf/arch.m4
+++ b/build/autoconf/arch.m4
@@ -211,17 +211,17 @@ if test "$CPU_ARCH" = "arm"; then
   AC_MSG_RESULT("$result")
   if test "$result" = "yes"; then
       AC_DEFINE(HAVE_ARM_SIMD)
       HAVE_ARM_SIMD=1
   fi
 
   AC_MSG_CHECKING(ARM version support in compiler)
   dnl Determine the target ARM architecture (5 for ARMv5, v5T, v5E, etc.; 6 for ARMv6, v6K, etc.)
-  ARM_ARCH=`${CC-cc} ${CFLAGS} -dM -E - < /dev/null | sed -n 's/.*__ARM_ARCH_\([[0-9]][[0-9]]*\).*/\1/p'`
+  ARM_ARCH=`${CC-cc} ${CFLAGS} -dM -E - < /dev/null | sed -n 's/.*__ARM_ARCH_\([[0-9]][[0-9]]*\).*/\1/p' | head -n 1`
   AC_MSG_RESULT("$ARM_ARCH")
 
   AC_MSG_CHECKING(for ARM NEON support in compiler)
   # We try to link so that this also fails when
   # building with LTO.
   AC_TRY_LINK([],
                  [asm(".fpu neon\n vadd.i8 d0, d0, d0");],
                  result="yes", result="no")