Commit d5a5fcb5 authored by Jean-Baptiste Kempf's avatar 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
parent 49fa93ac
...@@ -8,7 +8,11 @@ if [ -z "$ANDROID_NDK" ]; then ...@@ -8,7 +8,11 @@ if [ -z "$ANDROID_NDK" ]; then
fi fi
if [ -z "$ANDROID_ABI" ]; then 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 exit 1
fi fi
...@@ -28,6 +32,24 @@ for i in ${@}; do ...@@ -28,6 +32,24 @@ for i in ${@}; do
esac esac
done 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 # Set up ABI variables
if [ ${ANDROID_ABI} = "x86" ] ; then if [ ${ANDROID_ABI} = "x86" ] ; then
TARGET_TUPLE="i686-linux-android" TARGET_TUPLE="i686-linux-android"
...@@ -54,6 +76,19 @@ else ...@@ -54,6 +76,19 @@ else
HAVE_ARM=1 HAVE_ARM=1
fi 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 # try to detect NDK version
REL=$(grep -o '^r[0-9]*.*' $ANDROID_NDK/RELEASE.TXT 2>/dev/null|cut -b2-) REL=$(grep -o '^r[0-9]*.*' $ANDROID_NDK/RELEASE.TXT 2>/dev/null|cut -b2-)
......
...@@ -13,17 +13,10 @@ if [ -z "$ANDROID_NDK" -o -z "$ANDROID_SDK" ]; then ...@@ -13,17 +13,10 @@ if [ -z "$ANDROID_NDK" -o -z "$ANDROID_SDK" ]; then
fi fi
if [ -z "$ANDROID_ABI" ]; then 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 exit 1
fi fi
if [ -z "$NO_FPU" ];then
NO_FPU=0
fi
if [ -z "$NO_ARMV6" ];then
NO_ARMV6=0
fi
BUILD=0 BUILD=0
FETCH=0 FETCH=0
RELEASE=0 RELEASE=0
...@@ -106,16 +99,6 @@ export ANDROID_API ...@@ -106,16 +99,6 @@ export ANDROID_API
SYSROOT=$ANDROID_NDK/platforms/$ANDROID_API/arch-$PLATFORM_SHORT_ARCH 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 TARGET_TUPLE
export PATH_HOST export PATH_HOST
export HAVE_ARM export HAVE_ARM
...@@ -256,5 +239,4 @@ echo "export PATH=$NDK_TOOLCHAIN_PATH:\${ANDROID_SDK}/platform-tools:\${PATH}" > ...@@ -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 HAVE_ARM=${HAVE_ARM}" >> env.sh
echo "export NO_ARMV6=${NO_ARMV6}" >> 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 echo "export HAVE_64=${HAVE_64}" >> env.sh
...@@ -16,5 +16,3 @@ function optional_var { ...@@ -16,5 +16,3 @@ function optional_var {
rm -f $ENVTXT rm -f $ENVTXT
echo -e "ANDROID_ABI=$ANDROID_ABI" >> $ENVTXT echo -e "ANDROID_ABI=$ANDROID_ABI" >> $ENVTXT
optional_var "NO_FPU"
optional_var "NO_ARMV6"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment