Bug 815883 - fix WebRTC builds for ARM chips with neon FPUs by cloning some linux headers and fixing build files. r=dmose,ted
authorGian-Carlo Pascutto <gpascutto@mozilla.com>
Wed, 12 Dec 2012 12:05:54 -0800
changeset 115825 5f9c909db022888c7915ec3e2efa230dc86f69a0
parent 115824 d70010fceafa17bf8ab909ccd76c4f80af9ba71f
child 115826 5bbd7e9882b3f60c780a8d36c6743a9aa23adaad
push id24028
push useremorley@mozilla.com
push dateThu, 13 Dec 2012 15:56:02 +0000
treeherderautoland@9db79b97abbb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdmose, ted
bugs815883
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 815883 - fix WebRTC builds for ARM chips with neon FPUs by cloning some linux headers and fixing build files. r=dmose,ted
configure.in
media/webrtc/shared_libs.mk
media/webrtc/trunk/src/build/arm_neon.gypi
media/webrtc/trunk/src/modules/audio_processing/aecm/aecm.gypi
--- a/configure.in
+++ b/configure.in
@@ -5278,17 +5278,17 @@ if test -n "$MOZ_WEBRTC"; then
     MOZ_RAW=1
     MOZ_VP8=1
     MOZ_VP8_ENCODER=1
     MOZ_VP8_ERROR_CONCEALMENT=1
 
     dnl OpenSLES is only available in Android 2.3 and later; we'll change this
     dnl hard dependency to a dynamic load with graceful runtime failure before
     dnl we make --enable-webrtc on by default in Android (bug 815905)
-    dnl 
+    dnl
     if test "$OS_TARGET" = "Android"; then
        LDFLAGS="$LDFLAGS -lOpenSLES"
     fi
     case "$target" in
     *-android*|*-linuxandroid*)
        LDFLAGS="$LDFLAGS -lOpenSLES"
        ;;
     esac
@@ -9019,16 +9019,21 @@ if test "${OS_TARGET}" = "WINNT"; then
       OS_BITS=64
    else
       OS_BITS=32
    fi
    EXTRA_GYP_DEFINES="-D MSVS_VERSION=${_MSVS_VERSION} -D MSVS_OS_BITS=${OS_BITS}"
 
 elif test "${OS_TARGET}" = "Android"; then
    EXTRA_GYP_DEFINES="-D gtest_target_type=executable -D android_toolchain=${android_toolchain} -G os=android "
+   if test -n "$ARM_ARCH" && test "$ARM_ARCH" -lt 7; then
+      EXTRA_GYP_DEFINES+=" -D armv7=0 "
+   else
+      EXTRA_GYP_DEFINES+=" -D armv7=1 "
+   fi
 fi
 
 if test -n "$MOZ_WEBRTC"; then
    AC_MSG_RESULT("generating WebRTC Makefiles...")
 
 dnl Any --include files must also appear in -D FORCED_INCLUDE_FILE= entries
 dnl so that regeneration via dependencies works correctly
    WEBRTC_CONFIG="-D build_with_mozilla=1 --include ${srcdir}/media/webrtc/webrtc_config.gypi -D FORCED_INCLUDE_FILE=${srcdir}/media/webrtc/webrtc_config.gypi"
--- a/media/webrtc/shared_libs.mk
+++ b/media/webrtc/shared_libs.mk
@@ -46,16 +46,22 @@ WEBRTC_LIBS = \
 # if we're on an intel arch, we want SSE2 optimizations
 ifneq (,$(INTEL_ARCHITECTURE))
 WEBRTC_LIBS += \
   $(call EXPAND_LIBNAME_PATH,video_processing_sse2,$(DEPTH)/media/webrtc/trunk/src/modules/modules_video_processing_sse2) \
   $(call EXPAND_LIBNAME_PATH,aec_sse2,$(DEPTH)/media/webrtc/trunk/src/modules/modules_aec_sse2) \
   $(NULL)
 endif
 
+# neon for ARM
+ifeq ($(HAVE_ARM_NEON),1)
+WEBRTC_LIBS += \
+  $(call EXPAND_LIBNAME_PATH,aecm_neon,$(DEPTH)/media/webrtc/trunk/src/modules/modules_aecm_neon) \
+  $(NULL)
+endif
 
 
 # If you enable one of these codecs in webrtc_config.gypi, you'll need to re-add the
 # relevant library from this list:
 #
 #  $(call EXPAND_LIBNAME_PATH,G722,$(DEPTH)/media/webrtc/trunk/src/modules/modules_G722) \
 #  $(call EXPAND_LIBNAME_PATH,iLBC,$(DEPTH)/media/webrtc/trunk/src/modules/modules_iLBC) \
 #  $(call EXPAND_LIBNAME_PATH,iSAC,$(DEPTH)/media/webrtc/trunk/src/modules/modules_iSAC) \
--- a/media/webrtc/trunk/src/build/arm_neon.gypi
+++ b/media/webrtc/trunk/src/build/arm_neon.gypi
@@ -20,16 +20,24 @@
 # }
 
 {
   'conditions': [
     ['OS=="android"', {
       'cflags!': [
         '-mfpu=vfpv3-d16',
       ],
+      'cflags_mozilla!': [
+        '-mfpu=vfpv3-d16',
+      ],
       'cflags': [
         '-mfpu=neon',
         '-mfloat-abi=softfp',
         '-flax-vector-conversions',
       ],
+      'cflags_mozilla': [
+        '-mfpu=neon',
+        '-mfloat-abi=softfp',
+        '-flax-vector-conversions',
+      ]
     }],
   ],
 }
--- a/media/webrtc/trunk/src/modules/audio_processing/aecm/aecm.gypi
+++ b/media/webrtc/trunk/src/modules/audio_processing/aecm/aecm.gypi
@@ -27,17 +27,17 @@
       'sources': [
         'include/echo_control_mobile.h',
         'echo_control_mobile.c',
         'aecm_core.c',
         'aecm_core.h',
       ],
       'conditions': [
         ['target_arch=="arm" and armv7==1', {
-          'dependencies': [ 'aecm_neon', ],
+          'dependencies': [ 'aecm_neon', ]
         }],
       ],
     },
   ],
   'conditions': [
     ['target_arch=="arm" and armv7==1', {
       'targets': [
         {