android: Add x86 target.

Change-Id: If205f8c69a7ac803eecab394e6d1758aeda86336
This commit is contained in:
Thomas Martitz 2012-11-06 11:39:49 +01:00
parent 8e3c77d53e
commit 48572c6265

49
tools/configure vendored
View file

@ -667,8 +667,8 @@ androidcc () {
fi
buildhost=$(uname | tr "[:upper:]" "[:lower:]")
GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
LDOPTS=" $LDOPTS -shared -ldl -llog"
GLOBAL_LDOPTS="-Wl,-z,defs -Wl,-z,noexecstack"
LDOPTS="$LDOPTS -Wl,-soname,librockbox.so -shared -ldl -llog"
GLOBAL_LDOPTS="-Wl,-z,defs -Wl,-z,noexecstack -shared"
thread_support="HAVE_SIGALTSTACK_THREADS" # force for all archs
ANDROID_ARCH=$1 # for android.make too
# arch dependant stuff
@ -689,14 +689,28 @@ androidcc () {
--sysroot=$ANDROID_NDK_PATH/platforms/android-14/arch-mips -fPIC"
LDOPTS="$LDOPTS --sysroot=$ANDROID_NDK_PATH/platforms/android-14/arch-mips"
;;
x86)
endian=little
gccchoice="4.4.3"
gcctarget="i686-linux-android-"
gccdir=x86-$gccchoice
GCCOPTS="$GCCOPTS -Wa,--noexecstack -ffunction-sections -fomit-frame-pointer\
--sysroot=$ANDROID_NDK_PATH/platforms/android-9/arch-x86"
LDOPTS="$LDOPTS --sysroot=$ANDROID_NDK_PATH/platforms/android-9/arch-x86"
;;
*)
echo "ERROR: androidcc(): Unknown target architecture"
exit
;;
esac
echo "Application environment deemed $endian endian"
gccprefix=$ANDROID_NDK_PATH/toolchains/$gcctarget$gccchoice/prebuilt/$buildhost-x86
echo $gccdir
if [ -z "$gccdir" ]; then
gccdir=$gcctarget$gccchoice
fi
gccprefix=$ANDROID_NDK_PATH/toolchains/$gccdir/prebuilt/$buildhost-x86
PATH=$PATH:$gccprefix/bin
echo $PATH
prefixtools $gcctarget
}
@ -1311,6 +1325,7 @@ cat <<EOF
204) Pandora 191) HM-801
205) Samsung YP-R0
206) Android MIPS
207) Android x86
EOF
buildfor=`input`;
@ -3362,6 +3377,34 @@ fi
t_model="app"
;;
207|androidx86)
application="yes"
target_id=74
modelname="androidx86"
target="ANDROID"
app_type="android"
app_set_lcd_size
sharedir="/data/data/org.rockbox/app_rockbox/rockbox"
bindir="/data/data/org.rockbox/lib"
libdir="/data/data/org.rockbox/app_rockbox"
memory=8
uname=`uname`
androidcc x86
tool="cp "
boottool="cp "
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
output="librockbox.so"
bootoutput="librockbox.so"
appextra="recorder:gui:radio:hosted/android"
plugins="yes"
swcodec="yes"
# architecture, manufacturer and model for the target-tree build
t_cpu="hosted"
t_manufacturer="android"
t_model="app"
;;
*)
echo "Please select a supported target platform!"
exit 7