[Android] build: remove armv5/6 support

Thomas Guillem git at videolan.org
Tue Aug 30 11:23:05 CEST 2016


vlc-android | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Aug 30 08:47:20 2016 +0200| [22f2aa7ea7345c2b475a80cc7f00e50a021e424a] | committer: Thomas Guillem

build: remove armv5/6 support

> https://code.videolan.org/videolan/vlc-android/commit/22f2aa7ea7345c2b475a80cc7f00e50a021e424a
---

 compile-libvlc.sh               | 41 +++--------------------------------------
 compile.sh                      |  8 +-------
 libvlc/build.gradle             |  9 ---------
 libvlc/jni/Android.mk           |  9 ---------
 vlc-android/AndroidManifest.xml |  6 +++---
 vlc-android/build.gradle        | 21 +--------------------
 6 files changed, 8 insertions(+), 86 deletions(-)

diff --git a/compile-libvlc.sh b/compile-libvlc.sh
index f0d7c97..99bd8e5 100755
--- a/compile-libvlc.sh
+++ b/compile-libvlc.sh
@@ -50,7 +50,7 @@ fi
 if [ -z "$ANDROID_ABI" ]; then
     echo "Please pass the ANDROID ABI to the correct architecture, using
                 compile-libvlc.sh -a ARCH
-    ARM:     armeabi-v7a, armeabi, armeabi-v5, armeabi-nofpu
+    ARM:     armeabi-v7a
     ARM64:   arm64-v8a
     X86:     x86, x86_64
     MIPS:    mips, mips64."
@@ -231,23 +231,6 @@ VLC_MODULE_BLACKLIST="
 # FLAGS #
 #########
 
-# ARMv5 and ARMv6-nofpu are not really ABIs
-if [ "${ANDROID_ABI}" = "armeabi-nofpu" ];then
-    NO_FPU=0
-    ANDROID_ABI="armeabi"
-fi
-if [ "${ANDROID_ABI}" = "armeabi-v5" ];then
-    ARMV5=1
-    NO_FPU=0
-    ANDROID_ABI="armeabi"
-fi
-[ "${ANDROID_ABI}" = "armeabi" ] && cat << EOF
-For an ARMv6 device without FPU:
-use "-a armeabi-nofpu"
-For an ARMv5 device:
-use "-a armeabi-v5"
-EOF
-
 # Set up ABI variables
 if [ "${ANDROID_ABI}" = "x86" ] ; then
     TARGET_TUPLE="i686-linux-android"
@@ -273,7 +256,7 @@ elif [ "${ANDROID_ABI}" = "arm64-v8a" ] ; then
     HAVE_ARM=1
     HAVE_64=1
     PLATFORM_SHORT_ARCH="arm64"
-elif [ "${ANDROID_ABI}" = "armeabi-v7a" -o "${ANDROID_ABI}" = "armeabi" ] ; then
+elif [ "${ANDROID_ABI}" = "armeabi-v7a" ] ; then
     TARGET_TUPLE="arm-linux-androideabi"
     PATH_HOST=$TARGET_TUPLE
     HAVE_ARM=1
@@ -329,12 +312,6 @@ export PATH=${NDK_TOOLCHAIN_PATH}:${PATH}
 
 echo "ABI:        $ANDROID_ABI"
 echo "API:        $ANDROID_API"
-if [ ! -z "$NO_FPU" ]; then
-echo "FPU:        NO"
-fi
-if [ ! -z "$ARMV5" ]; then
-echo "ARMv5:       YES"
-fi
 echo "PATH:       $PATH"
 
 # Make in //
@@ -367,16 +344,6 @@ VLC_CFLAGS="${VLC_CFLAGS} -fstrict-aliasing -funsafe-math-optimizations"
 if [ "${ANDROID_ABI}" = "armeabi-v7a" ] ; then
     EXTRA_CFLAGS="-march=armv7-a -mfpu=vfpv3-d16 -mcpu=cortex-a8"
     EXTRA_CFLAGS="${EXTRA_CFLAGS} -mthumb -mfloat-abi=softfp"
-elif [ "${ANDROID_ABI}" = "armeabi" ] ; then
-    if [ -n "${ARMV5}" ]; then
-        EXTRA_CFLAGS="-march=armv5te -mtune=arm9tdmi -msoft-float"
-    else
-        if [ -n "${NO_FPU}" ]; then
-            EXTRA_CFLAGS="-march=armv6j -mtune=arm1136j-s -msoft-float"
-        else
-            EXTRA_CFLAGS="-mfpu=vfp -mcpu=arm1136jf-s -mfloat-abi=softfp"
-        fi
-    fi
 elif [ "${ANDROID_ABI}" = "x86" ] ; then
     EXTRA_CFLAGS="-mtune=atom -msse3 -mfpmath=sse -m32"
 elif [ "${ANDROID_ABI}" = "mips" ] ; then
@@ -397,11 +364,9 @@ EXTRA_CXXFLAGS="${EXTRA_CXXFLAGS} -D__STDC_FORMAT_MACROS=1 -D__STDC_CONSTANT_MAC
 #################
 
 VLC_LDFLAGS=""
-if [ -n "$HAVE_ARM" ]; then
 if [ ${ANDROID_ABI} = "armeabi-v7a" ]; then
         EXTRA_PARAMS=" --enable-neon"
         VLC_LDFLAGS="${VLC_LDFLAGS} -Wl,--fix-cortex-a8"
-    fi
 fi
 NDK_LIB_DIR="${NDK_TOOLCHAIN_DIR}/${TARGET_TUPLE}/lib"
 if [ "${PLATFORM_SHORT_ARCH}" = "x86_64" ];then
@@ -692,7 +657,7 @@ fi
 echo "Building NDK"
 
 HAVE_LIBCOMPAT=
-if [ "${ANDROID_API}" = "9" ] && [ "${ANDROID_ABI}" = "armeabi-v7a" -o "${ANDROID_ABI}" = "armeabi" ] ; then
+if [ "${ANDROID_API}" = "9" ] && [ "${ANDROID_ABI}" = "armeabi-v7a" ] ; then
     HAVE_LIBCOMPAT=1
 fi
 
diff --git a/compile.sh b/compile.sh
index 5228488..4fb6473 100755
--- a/compile.sh
+++ b/compile.sh
@@ -26,7 +26,7 @@ while [ $# -gt 0 ]; do
     case $1 in
         help|--help|-h)
             echo "Use -a to set the ARCH:"
-            echo "  ARM:     armeabi-v7a, armeabi, armeabi-v5, armeabi-nofpu"
+            echo "  ARM:     armeabi-v7a"
             echo "  ARM64:   arm64-v8a"
             echo "  X86:     x86, x86_64"
             echo "  MIPS:    mips, mips64."
@@ -85,12 +85,6 @@ fi
 
 if [ "$ANDROID_ABI" = "armeabi-v7a" ]; then
     GRADLE_ABI="ARMv7"
-elif [ "$ANDROID_ABI" = "armeabi-v5" ]; then
-    GRADLE_ABI="ARMv5"
-elif [ "$ANDROID_ABI" = "armeabi" ]; then
-    GRADLE_ABI="ARMv6fpu"
-elif [ "$ANDROID_ABI" = "armeabi-nofpu" ]; then
-    GRADLE_ABI="ARMv6nofpu"
 elif [ "$ANDROID_ABI" = "arm64-v8a" ]; then
     GRADLE_ABI="ARMv8"
 elif [ "$ANDROID_ABI" = "x86" ]; then
diff --git a/libvlc/build.gradle b/libvlc/build.gradle
index dbaa0b0..8c52ba3 100644
--- a/libvlc/build.gradle
+++ b/libvlc/build.gradle
@@ -73,15 +73,6 @@ tasks.withType(BuildNative){
     commandLine './compile-libvlc.sh'
 }
 
-task buildDebugARMv5(type:BuildNative) {
-    args('-a', "armeabi-v5")
-}
-task buildDebugARMv6(type:BuildNative) {
-    args('-a', "armeabi")
-}
-task buildDebugARMv6_nofpu(type:BuildNative) {
-    args('-a', "armeabi-nofpu")
-}
 task buildDebugARMv7(type:BuildNative) {
     args('-a', "armeabi-v7a")
 }
diff --git a/libvlc/jni/Android.mk b/libvlc/jni/Android.mk
index e6f8b4e..6b34a26 100644
--- a/libvlc/jni/Android.mk
+++ b/libvlc/jni/Android.mk
@@ -3,9 +3,6 @@ LOCAL_PATH := $(call my-dir)
 include $(CLEAR_VARS)
 LOCAL_MODULE := libvlc
 ARCH=$(APP_ABI)
-ifeq ($(ARCH), armeabi)
-	LOCAL_ARM_MODE := arm
-endif
 LOCAL_SRC_FILES += libvlcjni-modules.c libvlcjni-symbols.c dummy.cpp
 LOCAL_LDLIBS := \
 	-L$(VLC_CONTRIB)/lib \
@@ -43,12 +40,6 @@ LOCAL_C_INCLUDES := $(VLC_SRC_DIR)/include
 ARCH=$(APP_ABI)
 
 LOCAL_CFLAGS := -std=c11
-ifeq ($(ARCH), armeabi)
-	LOCAL_CFLAGS += -DHAVE_ARMEABI
-	# Needed by ARMv6 Thumb1 (the System Control coprocessor/CP15 is mandatory on ARMv6)
-	# On newer ARM architectures we can use Thumb2
-	LOCAL_ARM_MODE := arm
-endif
 ifeq ($(ARCH), armeabi-v7a)
 	LOCAL_CFLAGS += -DHAVE_ARMEABI_V7A
 endif
diff --git a/vlc-android/AndroidManifest.xml b/vlc-android/AndroidManifest.xml
index 8a5d21a..d21eb2a 100644
--- a/vlc-android/AndroidManifest.xml
+++ b/vlc-android/AndroidManifest.xml
@@ -13,9 +13,9 @@
          RR: Micro/Revision version from 00 to 99
          AA: ABI from 0 to 99
          0 is dev
-         1 is ARMv5
-         2 is ARMv6-nofpu
-         3 is ARMv6-fpu
+         1 was ARMv5        (deprecated)
+         2 was ARMv6-nofpu  (deprecated)
+         3 was ARMv6-fpu    (deprecated)
          4 is ARMv7-A
          5 is x86
          6 is MIPS
diff --git a/vlc-android/build.gradle b/vlc-android/build.gradle
index f3198d2..0be2497 100644
--- a/vlc-android/build.gradle
+++ b/vlc-android/build.gradle
@@ -52,8 +52,7 @@ android {
                 task.dependsOn luaPlaylistCopy
                 task.dependsOn luaMetaCopy
 
-                if (task.name.contains('ARMv7') || task.name.contains('ARMv6')
-                 || task.name.contains('ARMv5')) {
+                if (task.name.contains('ARMv7')) {
                     task.dependsOn libcompatCopy
                 }
                 else {
@@ -66,12 +65,6 @@ android {
         if (System.getenv('PASSWORD_KEYSTORE') == null)
             tasks.whenTaskAdded { task ->
                 if (task.name.startsWith('assemble')) {
-                    if (task.name.endsWith('ARMv5Debug'))
-                        task.dependsOn(":libvlc:buildDebugARMv5")
-                    else if (task.name.endsWith('ARMv6fpuDebug'))
-                        task.dependsOn(":libvlc:buildDebugARMv6")
-                    else if (task.name.endsWith('ARMv6nofpuDebug'))
-                        task.dependsOn(":libvlc:buildDebugARMv6_nofpu")
                     else if (task.name.endsWith('ARMv7Debug'))
                         task.dependsOn(":libvlc:buildDebugARMv7")
                     else if (task.name.endsWith('ARMv8Debug'))
@@ -132,18 +125,6 @@ android {
             dimension "target"
             versionCode = 2
         }
-        ARMv5 {
-            dimension "abi"
-            versionCode = 1
-        }
-        ARMv6nofpu {
-            dimension "abi"
-            versionCode = 2
-        }
-        ARMv6fpu {
-            dimension "abi"
-            versionCode = 3
-        }
         ARMv7 {
             dimension "abi"
             versionCode = 4



More information about the Android mailing list