diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-04-14 16:55:06 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-04-15 00:39:45 +0200 |
commit | d37ea94f2a85d0d23acaae2014a19d46693fe3df (patch) | |
tree | de2c33ccb6df299ff02aa9dcb7860f416302772f /tools/configure | |
parent | 2deb7d7a8ec31a45bdda3bcf5f4fc4fb0b15fd5b (diff) | |
download | rockbox-d37ea94f2a85d0d23acaae2014a19d46693fe3df.tar.gz 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/configure')
-rwxr-xr-x | tools/configure | 23 |
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 () { | |||
776 | thread_support="HAVE_SIGALTSTACK_THREADS" | 776 | thread_support="HAVE_SIGALTSTACK_THREADS" |
777 | ANDROID_ARCH=$2 # for android.make too | 777 | ANDROID_ARCH=$2 # for android.make too |
778 | ANDROID_PLATFORM_VERSION=$1 | 778 | ANDROID_PLATFORM_VERSION=$1 |
779 | GCCOPTS="$GCCOPTS $3" | ||
779 | gccchoice="4.9" | 780 | gccchoice="4.9" |
780 | # arch dependant stuff | 781 | # arch dependant stuff |
781 | case $ANDROID_ARCH in | 782 | case $ANDROID_ARCH in |
@@ -787,7 +788,18 @@ androidcc () { | |||
787 | if [ ${?} != 0 ]; then | 788 | if [ ${?} != 0 ]; then |
788 | exit | 789 | exit |
789 | fi | 790 | fi |
790 | GCCOPTS="$GCCOPTS -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer -fuse-ld=bfd" | 791 | # Android 4.4 (API 19) doesn't support anything older than armv7. |
792 | GCCOPTS="$GCCOPTS -fomit-frame-pointer -fuse-ld=bfd" | ||
793 | ;; | ||
794 | aarch64) | ||
795 | endian="little" | ||
796 | gcctarget="arm-linux-androideabi-" | ||
797 | echo "${make_toolchain} --toolchain=aarch64-linux-android-${gccchoice} --platform=android-$ANDROID_PLATFORM_VERSION --install-dir=${pwd}/android-toolchain" | ||
798 | ${make_toolchain} --toolchain=aarch64-linux-android-${gccchoice} --platform=android-$ANDROID_PLATFORM_VERSION --install-dir=${pwd}/android-toolchain | ||
799 | if [ ${?} != 0 ]; then | ||
800 | exit | ||
801 | fi | ||
802 | GCCOPTS="$GCCOPTS -fomit-frame-pointer -fuse-ld=bfd" # what default cpu arch/tune to use? | ||
791 | ;; | 803 | ;; |
792 | mips) | 804 | mips) |
793 | endian="little" | 805 | endian="little" |
@@ -849,6 +861,7 @@ androidndkcc() | |||
849 | GLOBAL_LDOPTS="-Wl,-z,defs -Wl,-z,noexecstack" | 861 | GLOBAL_LDOPTS="-Wl,-z,defs -Wl,-z,noexecstack" |
850 | 862 | ||
851 | ANDROID_PLATFORM_VERSION=$1 | 863 | ANDROID_PLATFORM_VERSION=$1 |
864 | GCCOPTS="$GCCOPTS $3" | ||
852 | 865 | ||
853 | # arch dependant stuff | 866 | # arch dependant stuff |
854 | case $2 in | 867 | case $2 in |
@@ -861,7 +874,7 @@ androidndkcc() | |||
861 | if [ ${?} != 0 ]; then | 874 | if [ ${?} != 0 ]; then |
862 | exit | 875 | exit |
863 | fi | 876 | fi |
864 | GCCOPTS="$GCCOPTS -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer" | 877 | GCCOPTS="$GCCOPTS -fomit-frame-pointer" |
865 | ;; | 878 | ;; |
866 | *) | 879 | *) |
867 | echo "ERROR: androidndkcc(): Unknown target architecture" | 880 | echo "ERROR: androidndkcc(): Unknown target architecture" |
@@ -3570,7 +3583,7 @@ fi | |||
3570 | libdir="/data/data/org.rockbox/app_rockbox" | 3583 | libdir="/data/data/org.rockbox/app_rockbox" |
3571 | memory=8 | 3584 | memory=8 |
3572 | uname=`uname` | 3585 | uname=`uname` |
3573 | androidcc 19 armeabi | 3586 | androidcc 19 armeabi "-march=armv7-a -mtune=cortex-a9 -mfloat-abi=softfp" |
3574 | tool="cp " | 3587 | tool="cp " |
3575 | boottool="cp " | 3588 | boottool="cp " |
3576 | bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" | 3589 | bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" |
@@ -4165,7 +4178,7 @@ fi | |||
4165 | # Actually 408260kB | 4178 | # Actually 408260kB |
4166 | memory=256 | 4179 | memory=256 |
4167 | uname=`uname` | 4180 | uname=`uname` |
4168 | androidndkcc 16 armeabi | 4181 | androidndkcc 16 armeabi "-mcpu=cortex-a9 -mfpu=neon-fp16 -mfloat-abi=softfp" |
4169 | tool="cp " | 4182 | tool="cp " |
4170 | boottool="cp " | 4183 | boottool="cp " |
4171 | bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" | 4184 | bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" |
@@ -4190,7 +4203,7 @@ fi | |||
4190 | lcd_orientation="landscape" | 4203 | lcd_orientation="landscape" |
4191 | memory=256 | 4204 | memory=256 |
4192 | uname=`uname` | 4205 | uname=`uname` |
4193 | androidndkcc 16 armeabi | 4206 | androidndkcc 16 armeabi "-mcpu=cortex-a9 -mfpu=neon-fp16 -mfloat-abi=softfp" |
4194 | tool="cp " | 4207 | tool="cp " |
4195 | boottool="cp " | 4208 | boottool="cp " |
4196 | bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" | 4209 | bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" |