Bug 1469790 - Build for NEON by default when targetting Android arm. r?build draft
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 27 Jun 2018 08:07:27 +0900
changeset 811157 7b2a786caf13ce4ec0122b8f53abc75c1daafb82
parent 811113 6b2f78aadfcce5f511466b7b2239b93c84083250
push id114210
push userbmo:mh+mozilla@glandium.org
push dateWed, 27 Jun 2018 01:53:50 +0000
reviewersbuild
bugs1469790, 1371266
milestone63.0a1
Bug 1469790 - Build for NEON by default when targetting Android arm. r?build The media/libpng/moz.build file overrides the C standard used via -std=c89, per bug 1371266, which conflicts with the use of the arm_neon.h header: compilation fails on the inline keyword, which didn't exist in C89. We thus "bump" to the GNU89 standard, which is C89+GNU extensions, including inline.
build/autoconf/arch.m4
media/libpng/moz.build
--- a/build/autoconf/arch.m4
+++ b/build/autoconf/arch.m4
@@ -26,17 +26,17 @@ MOZ_ARG_WITH_STRING(arch,
     MOZ_ARCH=$withval)
 
 if test -z "$MOZ_ARCH"; then
     dnl Defaults
     case "${CPU_ARCH}-${OS_TARGET}" in
     arm-Android)
         MOZ_THUMB=yes
         MOZ_ARCH=armv7-a
-        MOZ_FPU=vfpv3-d16
+        MOZ_FPU=neon
         MOZ_FLOAT_ABI=softfp
         MOZ_ALIGN=no
         ;;
     arm-Darwin)
         MOZ_ARCH=toolchain-default
         ;;
     esac
 fi
--- a/media/libpng/moz.build
+++ b/media/libpng/moz.build
@@ -61,9 +61,9 @@ if CONFIG['MOZ_TREE_FREETYPE']:
 Library('mozpng')
 
 FINAL_LIBRARY = 'gkmedias'
 
 # We allow warnings for third-party code that can be updated from upstream.
 AllowCompilerWarnings()
 
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
-    CFLAGS += ['-std=c89']
+    CFLAGS += ['-std=gnu89']