summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-04-14 16:55:06 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-04-15 00:39:45 +0200
commitd37ea94f2a85d0d23acaae2014a19d46693fe3df (patch)
treede2c33ccb6df299ff02aa9dcb7860f416302772f /tools
parent2deb7d7a8ec31a45bdda3bcf5f4fc4fb0b15fd5b (diff)
downloadrockbox-d37ea94f2a85d0d23acaae2014a19d46693fe3df.tar.gz
rockbox-d37ea94f2a85d0d23acaae2014a19d46693fe3df.tar.bz2
rockbox-d37ea94f2a85d0d23acaae2014a19d46693fe3df.zip
Android: Compile native android bits with armv7-a CPU flags
DX50/DX90 has a Cortex-A9 with NEON, use those specific flags for speed. Generic Android targets is for v4.4 (API 19) which doesn't support pre-v7 ARM CPUs, so target generic armv7-a with hardfp support. (This patch includes a rearrangement of the android toolchain helpers to allow target-specific GCCOPTS. Huzzah) Change-Id: I696051ef3fae25e1569c7b904decb7a3a0c6b674
Diffstat (limited to 'tools')
-rwxr-xr-xtools/configure23
1 files changed, 18 insertions, 5 deletions
diff --git a/tools/configure b/tools/configure
index a41a9e529b..38130f85e8 100755
--- a/tools/configure
+++ b/tools/configure
@@ -776,6 +776,7 @@ androidcc () {
thread_support="HAVE_SIGALTSTACK_THREADS"
ANDROID_ARCH=$2 # for android.make too
ANDROID_PLATFORM_VERSION=$1
+ GCCOPTS="$GCCOPTS $3"
gccchoice="4.9"
# arch dependant stuff
case $ANDROID_ARCH in
@@ -787,7 +788,18 @@ androidcc () {
if [ ${?} != 0 ]; then
exit
fi
- GCCOPTS="$GCCOPTS -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer -fuse-ld=bfd"
+ # Android 4.4 (API 19) doesn't support anything older than armv7.
+ GCCOPTS="$GCCOPTS -fomit-frame-pointer -fuse-ld=bfd"
+ ;;
+ aarch64)
+ endian="little"
+ gcctarget="arm-linux-androideabi-"
+ echo "${make_toolchain} --toolchain=aarch64-linux-android-${gccchoice} --platform=android-$ANDROID_PLATFORM_VERSION --install-dir=${pwd}/android-toolchain"
+ ${make_toolchain} --toolchain=aarch64-linux-android-${gccchoice} --platform=android-$ANDROID_PLATFORM_VERSION --install-dir=${pwd}/android-toolchain
+ if [ ${?} != 0 ]; then
+ exit
+ fi
+ GCCOPTS="$GCCOPTS -fomit-frame-pointer -fuse-ld=bfd" # what default cpu arch/tune to use?
;;
mips)
endian="little"
@@ -849,6 +861,7 @@ androidndkcc()
GLOBAL_LDOPTS="-Wl,-z,defs -Wl,-z,noexecstack"
ANDROID_PLATFORM_VERSION=$1
+ GCCOPTS="$GCCOPTS $3"
# arch dependant stuff
case $2 in
@@ -861,7 +874,7 @@ androidndkcc()
if [ ${?} != 0 ]; then
exit
fi
- GCCOPTS="$GCCOPTS -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer"
+ GCCOPTS="$GCCOPTS -fomit-frame-pointer"
;;
*)
echo "ERROR: androidndkcc(): Unknown target architecture"
@@ -3570,7 +3583,7 @@ fi
libdir="/data/data/org.rockbox/app_rockbox"
memory=8
uname=`uname`
- androidcc 19 armeabi
+ androidcc 19 armeabi "-march=armv7-a -mtune=cortex-a9 -mfloat-abi=softfp"
tool="cp "
boottool="cp "
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
@@ -4165,7 +4178,7 @@ fi
# Actually 408260kB
memory=256
uname=`uname`
- androidndkcc 16 armeabi
+ androidndkcc 16 armeabi "-mcpu=cortex-a9 -mfpu=neon-fp16 -mfloat-abi=softfp"
tool="cp "
boottool="cp "
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
@@ -4190,7 +4203,7 @@ fi
lcd_orientation="landscape"
memory=256
uname=`uname`
- androidndkcc 16 armeabi
+ androidndkcc 16 armeabi "-mcpu=cortex-a9 -mfpu=neon-fp16 -mfloat-abi=softfp"
tool="cp "
boottool="cp "
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"