Search
lxdream.org :: lxdream :: r1255:d63f73cc586f
lxdream 0.9.1
released Jun 29
Download Now
changeset1255:d63f73cc586f
parent1254:1ca50e1330cd
child1256:a9d29fe74bf3
authornkeynes
dateSun Mar 04 20:56:40 2012 +1000 (7 years ago)
Add support for armv7-a abi and make it the default - it's a good bit faster
Makefile.am
Makefile.in
configure
m4/android.m4
src/Makefile.in
src/tools/Makefile.in
1.1 --- a/Makefile.am Sun Mar 04 20:55:31 2012 +1000
1.2 +++ b/Makefile.am Sun Mar 04 20:56:40 2012 +1000
1.3 @@ -106,10 +106,10 @@
1.4 -Dout.dir="$$TARGETDIR" -Dnative.libs.dir="$$TARGETDIR/libs" \
1.5 -Dnative.libs.absolute.dir="$$TARGETDIR/libs" \
1.6 -Dtarget=$(ANDROID_SDK_VERSION) clean )
1.7 - $(mkdir_p) android/libs/armeabi
1.8 - $(INSTALL) src/liblxdream.so android/libs/armeabi/liblxdream.so
1.9 - $(INSTALL) $(ANDROID_GDBSERVER) android/libs/armeabi/gdbserver
1.10 - $(STRIP) --strip-unneeded android/libs/armeabi/liblxdream.so
1.11 + $(mkdir_p) android/libs/$(ANDROID_ABI)
1.12 + $(INSTALL) src/liblxdream.so android/libs/$(ANDROID_ABI)/liblxdream.so
1.13 + $(INSTALL) $(ANDROID_GDBSERVER) android/libs/$(ANDROID_ABI)/gdbserver
1.14 + $(STRIP) --strip-unneeded android/libs/$(ANDROID_ABI)/liblxdream.so
1.15 (TARGETDIR="`pwd`/android" && cd $(srcdir)/android && \
1.16 $(ANT) -buildfile build.xml -Dsdk.dir=$(ANDROID_SDK_HOME) \
1.17 -Dout.dir="$$TARGETDIR" -Dnative.libs.dir="$$TARGETDIR/libs" \
2.1 --- a/Makefile.in Sun Mar 04 20:55:31 2012 +1000
2.2 +++ b/Makefile.in Sun Mar 04 20:56:40 2012 +1000
2.3 @@ -94,6 +94,7 @@
2.4 AMDEP_FALSE = @AMDEP_FALSE@
2.5 AMDEP_TRUE = @AMDEP_TRUE@
2.6 AMTAR = @AMTAR@
2.7 +ANDROID_ABI = @ANDROID_ABI@
2.8 ANDROID_GDBSERVER = @ANDROID_GDBSERVER@
2.9 ANDROID_NDK_HOME = @ANDROID_NDK_HOME@
2.10 ANDROID_NDK_VERSION = @ANDROID_NDK_VERSION@
2.11 @@ -896,10 +897,10 @@
2.12 @GUI_ANDROID_TRUE@ -Dout.dir="$$TARGETDIR" -Dnative.libs.dir="$$TARGETDIR/libs" \
2.13 @GUI_ANDROID_TRUE@ -Dnative.libs.absolute.dir="$$TARGETDIR/libs" \
2.14 @GUI_ANDROID_TRUE@ -Dtarget=$(ANDROID_SDK_VERSION) clean )
2.15 -@GUI_ANDROID_TRUE@ $(mkdir_p) android/libs/armeabi
2.16 -@GUI_ANDROID_TRUE@ $(INSTALL) src/liblxdream.so android/libs/armeabi/liblxdream.so
2.17 -@GUI_ANDROID_TRUE@ $(INSTALL) $(ANDROID_GDBSERVER) android/libs/armeabi/gdbserver
2.18 -@GUI_ANDROID_TRUE@ $(STRIP) --strip-unneeded android/libs/armeabi/liblxdream.so
2.19 +@GUI_ANDROID_TRUE@ $(mkdir_p) android/libs/$(ANDROID_ABI)
2.20 +@GUI_ANDROID_TRUE@ $(INSTALL) src/liblxdream.so android/libs/$(ANDROID_ABI)/liblxdream.so
2.21 +@GUI_ANDROID_TRUE@ $(INSTALL) $(ANDROID_GDBSERVER) android/libs/$(ANDROID_ABI)/gdbserver
2.22 +@GUI_ANDROID_TRUE@ $(STRIP) --strip-unneeded android/libs/$(ANDROID_ABI)/liblxdream.so
2.23 @GUI_ANDROID_TRUE@ (TARGETDIR="`pwd`/android" && cd $(srcdir)/android && \
2.24 @GUI_ANDROID_TRUE@ $(ANT) -buildfile build.xml -Dsdk.dir=$(ANDROID_SDK_HOME) \
2.25 @GUI_ANDROID_TRUE@ -Dout.dir="$$TARGETDIR" -Dnative.libs.dir="$$TARGETDIR/libs" \
3.1 --- a/configure Sun Mar 04 20:55:31 2012 +1000
3.2 +++ b/configure Sun Mar 04 20:56:40 2012 +1000
3.3 @@ -683,6 +683,7 @@
3.4 host_vendor
3.5 host_os
3.6 ANT
3.7 +ANDROID_ABI
3.8 ANDROID_SDK_HOME
3.9 ANDROID_NDK_HOME
3.10 ANDROID_SDK_VERSION
3.11 @@ -1467,6 +1468,7 @@
3.12 --with-android-ndk=NDK Specify the location of the Android NDK
3.13 --with-android-version Specify target Android SDK version
3.14 --with-android-version Specify target Android NDK version
3.15 + --with-android-abi Specify target Android ABI
3.16 --with-osmesa Build with the osmesa GL library (software
3.17 rendering)
3.18 --with-gtk Build with the GTK UI. Default on X11 systems
3.19 @@ -2557,6 +2559,14 @@
3.20 fi
3.21
3.22
3.23 +# Check whether --with-android-abi was given.
3.24 +if test "${with_android_abi+set}" = set; then
3.25 + withval=$with_android_abi;
3.26 +else
3.27 + ANDROID_ABI="armeabi-v7a"
3.28 +fi
3.29 +
3.30 +
3.31 if test "x$with_android" != "x"; then
3.32 if test "$with_android" = "yes"; then
3.33 { { echo "$as_me:$LINENO: error: --with-android option must be given with the path to the Android SDK " >&5
3.34 @@ -2656,8 +2666,10 @@
3.35 fi
3.36
3.37
3.38 - case $host_alias in
3.39 - arm-* | "")
3.40 + TARGETFLAGS="-ffunction-sections -funwind-tables -fomit-frame-pointer -DANDROID -Wa,--noexecstack"
3.41 +
3.42 + case $ANDROID_ABI in
3.43 + armeabi | armeabi-v7a)
3.44 host_alias="arm-linux-androideabi"
3.45 host_cpu="arm"
3.46 host_vendor="unknown";
3.47 @@ -2665,10 +2677,14 @@
3.48 ANDROID_NDK_BIN=`echo $ANDROID_NDK_HOME/toolchains/arm-*/prebuilt/*/bin`
3.49 ANDROID_GDBSERVER=`echo $ANDROID_NDK_HOME/toolchains/arm-*/prebuilt/gdbserver`
3.50 ANDROID_SYSROOT="$ANDROID_NDK_HOME/platforms/$ANDROID_NDK_VERSION/arch-arm"
3.51 - TARGETFLAGS="-ffunction-sections -funwind-tables -fstack-protector -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -DANDROID -Wno-psabi -Wa,--noexecstack"
3.52 - TARGETFLAGS="$TARGETFLAGS -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -march=armv5te -mtune=xscale -msoft-float -mthumb -Os"
3.53 + TARGETFLAGS="$TARGETFLAGS -fstack-protector -finline-limit=64 -fno-strict-aliasing -Wno-psabi -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__"
3.54 + if test "x$with_abi" = "armeabi"; then
3.55 + TARGETFLAGS="$TARGETFLAGS -march=armv5te -mtune=xscale -msoft-float"
3.56 + else
3.57 + TARGETFLAGS="$TARGETFLAGS -march=armv7-a -mtune=cortex-a8 -mfloat-abi=softfp -mfpu=vfp"
3.58 + fi
3.59 ;;
3.60 - i686-*)
3.61 + x86)
3.62 host_alias="i686-android-linux"
3.63 host_cpu="i686"
3.64 host_vendor="android"
3.65 @@ -2676,11 +2692,11 @@
3.66 ANDROID_NDK_BIN=`echo $ANDROID_NDK_HOME/toolchains/x86-*/prebuilt/*/bin`
3.67 ANDROID_GDBSERVER=`echo $ANDROID_NDK_HOME/toolchains/x86-*/prebuilt/gdbserver`
3.68 ANDROID_SYSROOT="$ANDROID_NDK_HOME/platforms/$ANDROID_NDK_VERSION/arch-x86"
3.69 - TARGETFLAGS=""
3.70 + TARGETFLAGS="$TARGETFLAGS -finline-limit=300 -fno-rtti -funswitch-loops -fstrict-aliasing"
3.71 ;;
3.72 *)
3.73 - { { echo "$as_me:$LINENO: error: Unsupported android host $host_alias" >&5
3.74 -echo "$as_me: error: Unsupported android host $host_alias" >&2;}
3.75 + { { echo "$as_me:$LINENO: error: Unsupported android ABI $ANDROID_ABI" >&5
3.76 +echo "$as_me: error: Unsupported android ABI $ANDROID_ABI" >&2;}
3.77 { (exit 1); exit 1; }; }
3.78 ;;
3.79 esac
3.80 @@ -2744,6 +2760,7 @@
3.81
3.82
3.83
3.84 +
3.85 ANDROID_BUILD=yes
3.86 cross_compiling=yes
3.87 fi
3.88 @@ -16760,6 +16777,7 @@
3.89 host_vendor!$host_vendor$ac_delim
3.90 host_os!$host_os$ac_delim
3.91 ANT!$ANT$ac_delim
3.92 +ANDROID_ABI!$ANDROID_ABI$ac_delim
3.93 ANDROID_SDK_HOME!$ANDROID_SDK_HOME$ac_delim
3.94 ANDROID_NDK_HOME!$ANDROID_NDK_HOME$ac_delim
3.95 ANDROID_SDK_VERSION!$ANDROID_SDK_VERSION$ac_delim
3.96 @@ -16786,7 +16804,6 @@
3.97 CPP!$CPP$ac_delim
3.98 CC!$CC$ac_delim
3.99 CFLAGS!$CFLAGS$ac_delim
3.100 -CPPFLAGS!$CPPFLAGS$ac_delim
3.101 _ACEOF
3.102
3.103 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
3.104 @@ -16828,6 +16845,7 @@
3.105 ac_delim='%!_!# '
3.106 for ac_last_try in false false false false false :; do
3.107 cat >conf$$subs.sed <<_ACEOF
3.108 +CPPFLAGS!$CPPFLAGS$ac_delim
3.109 CC_FOR_BUILD!$CC_FOR_BUILD$ac_delim
3.110 ac_ct_CC_FOR_BUILD!$ac_ct_CC_FOR_BUILD$ac_delim
3.111 CC_FOR_BUILDDEPMODE!$CC_FOR_BUILDDEPMODE$ac_delim
3.112 @@ -16924,7 +16942,6 @@
3.113 BUILD_SYSTEST_FALSE!$BUILD_SYSTEST_FALSE$ac_delim
3.114 BUILD_ARMTEST_TRUE!$BUILD_ARMTEST_TRUE$ac_delim
3.115 BUILD_ARMTEST_FALSE!$BUILD_ARMTEST_FALSE$ac_delim
3.116 -LXDREAM_LIBS!$LXDREAM_LIBS$ac_delim
3.117 _ACEOF
3.118
3.119 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
3.120 @@ -16966,6 +16983,7 @@
3.121 ac_delim='%!_!# '
3.122 for ac_last_try in false false false false false :; do
3.123 cat >conf$$subs.sed <<_ACEOF
3.124 +LXDREAM_LIBS!$LXDREAM_LIBS$ac_delim
3.125 GETTEXT_PACKAGE!$GETTEXT_PACKAGE$ac_delim
3.126 USE_NLS!$USE_NLS$ac_delim
3.127 MSGFMT!$MSGFMT$ac_delim
3.128 @@ -16987,7 +17005,7 @@
3.129 LTLIBOBJS!$LTLIBOBJS$ac_delim
3.130 _ACEOF
3.131
3.132 - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 19; then
3.133 + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 20; then
3.134 break
3.135 elif $ac_last_try; then
3.136 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
4.1 --- a/m4/android.m4 Sun Mar 04 20:55:31 2012 +1000
4.2 +++ b/m4/android.m4 Sun Mar 04 20:56:40 2012 +1000
4.3 @@ -8,6 +8,7 @@
4.4 AC_ARG_WITH( android-ndk, AS_HELP_STRING( [--with-android-ndk=NDK], [Specify the location of the Android NDK] ) )
4.5 AC_ARG_WITH( android-version, AS_HELP_STRING( [--with-android-version], [Specify target Android SDK version]), [], [with_android_version="android-11"] )
4.6 AC_ARG_WITH( android-ndk-version, AS_HELP_STRING( [--with-android-version], [Specify target Android NDK version]), [], [with_ndk_version="android-9"] )
4.7 + AC_ARG_WITH( android-abi, AS_HELP_STRING( [--with-android-abi], [Specify target Android ABI]), [], [ANDROID_ABI="armeabi-v7a"] )
4.8
4.9 if test "x$with_android" != "x"; then
4.10 if test "$with_android" = "yes"; then
4.11 @@ -26,8 +27,11 @@
4.12 AC_CHECK_FILE( [$ANDROID_SDK_HOME/platforms/$ANDROID_SDK_VERSION/sdk.properties], [], [ AC_MSG_ERROR([Android platform version $ANDROID_SDK_VERSION not found in $ANDROID_SDK_HOME]) ])
4.13 AC_CHECK_FILE( [$ANDROID_NDK_HOME/toolchains], [], [ AC_MSG_ERROR([Android NDK not found in $ANDROID_NDK_HOME]) ])
4.14
4.15 - case $host_alias in
4.16 - arm-* | "")
4.17 + dnl common flags
4.18 + TARGETFLAGS="-ffunction-sections -funwind-tables -fomit-frame-pointer -DANDROID -Wa,--noexecstack"
4.19 +
4.20 + case $ANDROID_ABI in
4.21 + armeabi | armeabi-v7a)
4.22 host_alias="arm-linux-androideabi"
4.23 host_cpu="arm"
4.24 host_vendor="unknown";
4.25 @@ -35,10 +39,15 @@
4.26 ANDROID_NDK_BIN=`echo $ANDROID_NDK_HOME/toolchains/arm-*/prebuilt/*/bin`
4.27 ANDROID_GDBSERVER=`echo $ANDROID_NDK_HOME/toolchains/arm-*/prebuilt/gdbserver`
4.28 ANDROID_SYSROOT="$ANDROID_NDK_HOME/platforms/$ANDROID_NDK_VERSION/arch-arm"
4.29 - TARGETFLAGS="-ffunction-sections -funwind-tables -fstack-protector -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -DANDROID -Wno-psabi -Wa,--noexecstack"
4.30 - TARGETFLAGS="$TARGETFLAGS -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -march=armv5te -mtune=xscale -msoft-float -mthumb -Os"
4.31 + dnl Common ARM flags
4.32 + TARGETFLAGS="$TARGETFLAGS -fstack-protector -finline-limit=64 -fno-strict-aliasing -Wno-psabi -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__"
4.33 + if test "x$with_abi" = "armeabi"; then
4.34 + TARGETFLAGS="$TARGETFLAGS -march=armv5te -mtune=xscale -msoft-float"
4.35 + else
4.36 + TARGETFLAGS="$TARGETFLAGS -march=armv7-a -mtune=cortex-a8 -mfloat-abi=softfp -mfpu=vfp"
4.37 + fi
4.38 ;;
4.39 - i686-*)
4.40 + x86)
4.41 host_alias="i686-android-linux"
4.42 host_cpu="i686"
4.43 host_vendor="android"
4.44 @@ -46,10 +55,10 @@
4.45 ANDROID_NDK_BIN=`echo $ANDROID_NDK_HOME/toolchains/x86-*/prebuilt/*/bin`
4.46 ANDROID_GDBSERVER=`echo $ANDROID_NDK_HOME/toolchains/x86-*/prebuilt/gdbserver`
4.47 ANDROID_SYSROOT="$ANDROID_NDK_HOME/platforms/$ANDROID_NDK_VERSION/arch-x86"
4.48 - TARGETFLAGS=""
4.49 + TARGETFLAGS="$TARGETFLAGS -finline-limit=300 -fno-rtti -funswitch-loops -fstrict-aliasing"
4.50 ;;
4.51 *)
4.52 - AC_MSG_ERROR([Unsupported android host $host_alias])
4.53 + AC_MSG_ERROR([Unsupported android ABI $ANDROID_ABI])
4.54 ;;
4.55 esac
4.56
4.57 @@ -67,6 +76,7 @@
4.58 LDFLAGS="-nostdlib -Wl,--no-undefined -L${ANDROID_SYSROOT}/usr/lib -Wl,-rpath-link,${ANDROID_SYSROOT}/usr/lib -Wl,-allow-shlib-undefined -Wl,-z,noexecstack $LDFLAGS"
4.59 LIBS="$LIBS -liconv -landroid -llog -lgcc -lc -lm"
4.60
4.61 + AC_SUBST(ANDROID_ABI)
4.62 AC_SUBST(ANDROID_SDK_HOME)
4.63 AC_SUBST(ANDROID_NDK_HOME)
4.64 AC_SUBST(ANDROID_SDK_VERSION)
5.1 --- a/src/Makefile.in Sun Mar 04 20:55:31 2012 +1000
5.2 +++ b/src/Makefile.in Sun Mar 04 20:56:40 2012 +1000
5.3 @@ -345,6 +345,7 @@
5.4 AMDEP_FALSE = @AMDEP_FALSE@
5.5 AMDEP_TRUE = @AMDEP_TRUE@
5.6 AMTAR = @AMTAR@
5.7 +ANDROID_ABI = @ANDROID_ABI@
5.8 ANDROID_GDBSERVER = @ANDROID_GDBSERVER@
5.9 ANDROID_NDK_HOME = @ANDROID_NDK_HOME@
5.10 ANDROID_NDK_VERSION = @ANDROID_NDK_VERSION@
6.1 --- a/src/tools/Makefile.in Sun Mar 04 20:55:31 2012 +1000
6.2 +++ b/src/tools/Makefile.in Sun Mar 04 20:56:40 2012 +1000
6.3 @@ -78,6 +78,7 @@
6.4 AMDEP_FALSE = @AMDEP_FALSE@
6.5 AMDEP_TRUE = @AMDEP_TRUE@
6.6 AMTAR = @AMTAR@
6.7 +ANDROID_ABI = @ANDROID_ABI@
6.8 ANDROID_GDBSERVER = @ANDROID_GDBSERVER@
6.9 ANDROID_NDK_HOME = @ANDROID_NDK_HOME@
6.10 ANDROID_NDK_VERSION = @ANDROID_NDK_VERSION@
.