[Android] Rework the ABI exports for ARMv6
Jean-Baptiste Kempf
git at videolan.org
Wed Feb 4 19:55:49 CET 2015
vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Feb 4 19:54:58 2015 +0100| [d5a5fcb58695243707dfe6e5709dfe12ddfe6364] | committer: Jean-Baptiste Kempf
Rework the ABI exports for ARMv6
If you want v5, use ANDROID_ABI=armeabi-v5
If you want v6-nofpu, use ANDROID_ABI=armeabi-nofpu
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=d5a5fcb58695243707dfe6e5709dfe12ddfe6364
---
compile-libvlc.sh | 37 ++++++++++++++++++++++++++++++++++++-
compile.sh | 20 +-------------------
gen-env.sh | 2 --
3 files changed, 37 insertions(+), 22 deletions(-)
diff --git a/compile-libvlc.sh b/compile-libvlc.sh
index 8029440..04a08fb 100755
--- a/compile-libvlc.sh
+++ b/compile-libvlc.sh
@@ -8,7 +8,11 @@ if [ -z "$ANDROID_NDK" ]; then
fi
if [ -z "$ANDROID_ABI" ]; then
- echo "Please set ANDROID_ABI to your architecture: armeabi-v7a, armeabi, arm64-v8a, x86, x86_64 or mips."
+ echo "Please set ANDROID_ABI to your architecture:
+ ARM: armeabi-v7a, armeabi, armeabi-v5, armeabi-nofpu
+ ARM64: arm64-v8a
+ X86: x86, x86_64
+ MIPS: mips, mips64."
exit 1
fi
@@ -28,6 +32,24 @@ for i in ${@}; do
esac
done
+
+if [ ${ANDROID_ABI} == "armeabi-nofpu" ];then
+ NO_FPU=0
+ ANDROID_ABI="armeabi"
+fi
+if [ ${ANDROID_ABI} == "armeabi-v5" ];then
+ NO_ARMV6=0
+ NO_FPU=0
+ ANDROID_ABI="armeabi"
+fi
+[ ${ANDROID_ABI} = "armeabi" ] && cat << EOF
+For an ARMv6 device without FPU:
+$ export ANDROID_ABI="armeabi-nofpu"
+For an ARMv5 device:
+$ export ANDROID_ABI="armeabi-v5"
+EOF
+
+
# Set up ABI variables
if [ ${ANDROID_ABI} = "x86" ] ; then
TARGET_TUPLE="i686-linux-android"
@@ -54,6 +76,19 @@ else
HAVE_ARM=1
fi
+######
+# DISPLAY
+######
+
+echo "ABI: $ANDROID_ABI"
+if [ ! -z "$NO_FPU" ]; then
+echo "FPU: NO"
+fi
+if [ ! -z "$NO_ARMV6" ]; then
+echo "ARMv5: YES"
+fi
+
+exit 1
# try to detect NDK version
REL=$(grep -o '^r[0-9]*.*' $ANDROID_NDK/RELEASE.TXT 2>/dev/null|cut -b2-)
diff --git a/compile.sh b/compile.sh
index f9b55ec..6e359c3 100755
--- a/compile.sh
+++ b/compile.sh
@@ -13,17 +13,10 @@ if [ -z "$ANDROID_NDK" -o -z "$ANDROID_SDK" ]; then
fi
if [ -z "$ANDROID_ABI" ]; then
- echo "Please set ANDROID_ABI to your architecture: armeabi-v7a, armeabi, arm64-v8a, x86, x86_64 or mips."
+ echo "Please set ANDROID_ABI to your architecture."
exit 1
fi
-if [ -z "$NO_FPU" ];then
- NO_FPU=0
-fi
-if [ -z "$NO_ARMV6" ];then
- NO_ARMV6=0
-fi
-
BUILD=0
FETCH=0
RELEASE=0
@@ -106,16 +99,6 @@ export ANDROID_API
SYSROOT=$ANDROID_NDK/platforms/$ANDROID_API/arch-$PLATFORM_SHORT_ARCH
-# XXX : important!
-[ ${ANDROID_ABI} = "armeabi" ] && cat << EOF
-For an ARMv6 device without FPU:
-$ export NO_FPU=1
-For an ARMv5 device:
-$ export NO_ARMV6=1
-
-If you plan to use a release build, run 'compile.sh release'
-EOF
-
export TARGET_TUPLE
export PATH_HOST
export HAVE_ARM
@@ -256,5 +239,4 @@ echo "export PATH=$NDK_TOOLCHAIN_PATH:\${ANDROID_SDK}/platform-tools:\${PATH}" >
echo "export HAVE_ARM=${HAVE_ARM}" >> env.sh
echo "export NO_ARMV6=${NO_ARMV6}" >> env.sh
-echo "export NO_FPU=${NO_FPU}" >> env.sh
echo "export HAVE_64=${HAVE_64}" >> env.sh
diff --git a/gen-env.sh b/gen-env.sh
index 7357434..46299d9 100755
--- a/gen-env.sh
+++ b/gen-env.sh
@@ -16,5 +16,3 @@ function optional_var {
rm -f $ENVTXT
echo -e "ANDROID_ABI=$ANDROID_ABI" >> $ENVTXT
-optional_var "NO_FPU"
-optional_var "NO_ARMV6"
More information about the Android
mailing list