summaryrefslogtreecommitdiff
path: root/tools/configure
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2012-11-06 09:25:36 +0100
committerThomas Martitz <kugel@rockbox.org>2012-11-06 12:21:14 +0100
commit8e3c77d53e14e4ac9371ea21bc7ae747304c3ee9 (patch)
treed782a7472ff432f3a8be042b2bfb97b349a9e41c /tools/configure
parent885079b8af7f66f87d94b6721d03f49e569cc43e (diff)
downloadrockbox-8e3c77d53e14e4ac9371ea21bc7ae747304c3ee9.zip
rockbox-8e3c77d53e14e4ac9371ea21bc7ae747304c3ee9.tar.gz
rockbox-8e3c77d53e14e4ac9371ea21bc7ae747304c3ee9.tar.bz2
rockbox-8e3c77d53e14e4ac9371ea21bc7ae747304c3ee9.tar.xz
configure: merge androidcc and androidmipscc.
Change-Id: Ice8ba3f2cb51091486b3f446447cc8d256bc4c00
Diffstat (limited to 'tools/configure')
-rwxr-xr-xtools/configure67
1 files changed, 29 insertions, 38 deletions
diff --git a/tools/configure b/tools/configure
index 2b4a05d..5a38060 100755
--- a/tools/configure
+++ b/tools/configure
@@ -666,47 +666,38 @@ androidcc () {
exit
fi
buildhost=$(uname | tr "[:upper:]" "[:lower:]")
- gccchoice="4.4.3"
- gcctarget="arm-linux-androideabi-"
- gccprefix=$ANDROID_NDK_PATH/toolchains/$gcctarget$gccchoice/prebuilt/$buildhost-x86
- PATH=$PATH:$gccprefix/bin
- prefixtools $gcctarget
GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
- GCCOPTS="$GCCOPTS -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
- --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm"
+ LDOPTS=" $LDOPTS -shared -ldl -llog"
GLOBAL_LDOPTS="-Wl,-z,defs -Wl,-z,noexecstack"
- LDOPTS="-shared -ldl -llog --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm $LDOPTS"
- endian="little"
- SHARED_LDFLAG="-shared"
- ANDROID_ARCH=armeabi
-}
-
-androidmipscc () {
- if [ -z "$ANDROID_SDK_PATH" ]; then
- echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
- echo "environment variable point to the root directory of the Android SDK."
- exit
- fi
- if [ -z "$ANDROID_NDK_PATH" ]; then
- echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
- echo "environment variable point to the root directory of the Android NDK."
- exit
- fi
- buildhost=$(uname | tr "[:upper:]" "[:lower:]")
- gccchoice="4.4.3"
- gcctarget="mipsel-linux-android-"
+ thread_support="HAVE_SIGALTSTACK_THREADS" # force for all archs
+ ANDROID_ARCH=$1 # for android.make too
+ # arch dependant stuff
+ case $ANDROID_ARCH in
+ armeabi)
+ endian="little"
+ gccchoice="4.4.3"
+ gcctarget="arm-linux-androideabi-"
+ GCCOPTS="$GCCOPTS -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
+ --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm"
+ LDOPTS="$LDOPTS --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm"
+ ;;
+ mips)
+ endian="little"
+ gccchoice="4.4.3"
+ gcctarget="mipsel-linux-android-"
+ GCCOPTS="$GCCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -fomit-frame-pointer \
+ --sysroot=$ANDROID_NDK_PATH/platforms/android-14/arch-mips -fPIC"
+ LDOPTS="$LDOPTS --sysroot=$ANDROID_NDK_PATH/platforms/android-14/arch-mips"
+ ;;
+ *)
+ echo "ERROR: androidcc(): Unknown target architecture"
+ exit
+ ;;
+ esac
+ echo "Application environment deemed $endian endian"
gccprefix=$ANDROID_NDK_PATH/toolchains/$gcctarget$gccchoice/prebuilt/$buildhost-x86
- thread_support="HAVE_SIGALTSTACK_THREADS"
PATH=$PATH:$gccprefix/bin
prefixtools $gcctarget
- GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
- GCCOPTS="$GCCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -fomit-frame-pointer \
- --sysroot=$ANDROID_NDK_PATH/platforms/android-14/arch-mips -fPIC"
- GLOBAL_LDOPTS="-Wl,-z,defs -Wl,-z,noexecstack"
- LDOPTS="-shared -ldl -llog --sysroot=$ANDROID_NDK_PATH/platforms/android-14/arch-mips $LDOPTS"
- endian="little"
- SHARED_LDFLAG="-shared"
- ANDROID_ARCH=mips
}
whichadvanced () {
@@ -3223,7 +3214,7 @@ fi
libdir="/data/data/org.rockbox/app_rockbox"
memory=8
uname=`uname`
- androidcc
+ androidcc armeabi
tool="cp "
boottool="cp "
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
@@ -3355,7 +3346,7 @@ fi
libdir="/data/data/org.rockbox/app_rockbox"
memory=8
uname=`uname`
- androidmipscc
+ androidcc mips
tool="cp "
boottool="cp "
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"