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.
--- 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']