configure.in | 86 +++++++++++++++--------------- distro-configs/LibreOfficeAndroidX86.conf | 1 2 files changed, 45 insertions(+), 42 deletions(-)
New commits: commit 42f17f3f62471d5be4fe7db7334db09c3b8cbe08 Author: Tor Lillqvist <t...@iki.fi> Date: Mon Jul 30 10:32:01 2012 +0300 Add --with-android-ndk-toolchain-version. NDK r8b support still work in progress diff --git a/configure.in b/configure.in index 2c4580b..546b88a 100644 --- a/configure.in +++ b/configure.in @@ -115,6 +115,12 @@ AC_ARG_WITH(android-ndk, [Specify location of the Android Native Development Kit. Mandatory when building for Android.]), ,) +AC_ARG_WITH(android-ndk-toolchain-version, + AS_HELP_STRING([--with-android-ndk-toolchain-version], + [Specify which toolchain version to use, of those present in the + Android NDK you are using. Mandatory if the NDK used has several + toolchain versions for the host architecture you are building for.]), ,) + AC_ARG_WITH(android-sdk, AS_HELP_STRING([--with-android-sdk], [Specify location of the Android SDK. Mandatory when building for Android.]), @@ -134,11 +140,17 @@ if test -n "$with_android_ndk"; then # possiblity to use the gold linker, which should bring a nice speedup to # linking especially our libmerged. Work to support that in progress. Until # that is done, please use no newer NDK than r8. + + ANDROID_ABI_PREBUILT_BIN=`echo $ANDROID_NDK_HOME/toolchains/$host_cpu-*$with_android_ndk_toolchain_version/prebuilt/*/bin` + # Check if there are several toolchain versions + case "$ANDROID_ABI_PREBUILT_BIN" in + */bin\ */bin*) + AC_MSG_ERROR([Several toolchain versions in NDK, you must specify --with-android-ndk-toolchain-version]) + esac + if test $host_cpu = arm; then - ANDROID_ABI_PREBUILT_BIN=`echo $ANDROID_NDK_HOME/toolchains/$host_cpu-linux*/prebuilt/*/bin` android_gcc_prefix=arm-linux-androideabi else - ANDROID_ABI_PREBUILT_BIN=`echo $ANDROID_NDK_HOME/toolchains/$host_cpu-*/prebuilt/*/bin` android_gcc_prefix=i686-android-linux fi commit 33204ac6253e358d3340a0d7ed18908fee651eb9 Author: Tor Lillqvist <t...@iki.fi> Date: Mon Jul 30 10:20:45 2012 +0300 We use four-column indentation steps diff --git a/configure.in b/configure.in index a360fff..2c4580b 100644 --- a/configure.in +++ b/configure.in @@ -122,42 +122,42 @@ AC_ARG_WITH(android-sdk, ANDROID_NDK_HOME= if test -n "$with_android_ndk"; then - ANDROID_NDK_HOME=$with_android_ndk - - # Set up a lot of pre-canned defaults - # What if the NDK at some point starts including several toolchains for different - # gcc versions (like some 3rd-party improved NDK builds already do)? - # Then the use of a wildcard below will break. - - # That indeed happened with NDK r8b, which has both gcc 4.4.3 and 4.6 - # -based toolchains. The latter has interesting new features, like the - # possiblity to use the gold linker, which should bring a nice speedup to - # linking especially our libmerged. Work to support that in progress. Until - # that is done, please use no newer NDK than r8. - if test $host_cpu = arm; then + ANDROID_NDK_HOME=$with_android_ndk + + # Set up a lot of pre-canned defaults + # What if the NDK at some point starts including several toolchains for different + # gcc versions (like some 3rd-party improved NDK builds already do)? + # Then the use of a wildcard below will break. + + # That indeed happened with NDK r8b, which has both gcc 4.4.3 and 4.6 + # -based toolchains. The latter has interesting new features, like the + # possiblity to use the gold linker, which should bring a nice speedup to + # linking especially our libmerged. Work to support that in progress. Until + # that is done, please use no newer NDK than r8. + if test $host_cpu = arm; then ANDROID_ABI_PREBUILT_BIN=`echo $ANDROID_NDK_HOME/toolchains/$host_cpu-linux*/prebuilt/*/bin` android_gcc_prefix=arm-linux-androideabi - else + else ANDROID_ABI_PREBUILT_BIN=`echo $ANDROID_NDK_HOME/toolchains/$host_cpu-*/prebuilt/*/bin` android_gcc_prefix=i686-android-linux - fi + fi - test -z "$SYSBASE" && export SYSBASE=$ANDROID_NDK_HOME/platforms/android-9/arch-$host_cpu - test -z "$AR" && AR=$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-ar - test -z "$NM" && NM=$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-nm - test -z "$OBJDUMP" && OBJDUMP=$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-objdump - test -z "$RANLIB" && RANLIB=$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-ranlib - test -z "$STRIP" && STRIP=$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-strip - - if test $host_cpu = arm; then - ANDROIDCFLAGS="-march=armv7-a -mfloat-abi=softfp -mfpu=neon -Wl,--fix-cortex-a8 --sysroot $ANDROID_NDK_HOME/platforms/android-9/arch-arm -L$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a" - ANDROIDCXXFLAGS="$ANDROIDCFLAGS -I $ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/include -I$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include" - else # x86 - ANDROIDCFLAGS="-march=atom --sysroot $ANDROID_NDK_HOME/platforms/android-9/arch-x86 -L$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/libs/x86" - ANDROIDCXXFLAGS="$ANDROIDCFLAGS -I $ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/include -I$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/libs/x86/include" - fi - test -z "$CC" && CC="$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-gcc $ANDROIDCFLAGS" - test -z "$CXX" && CXX="$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-g++ $ANDROIDCXXFLAGS" + test -z "$SYSBASE" && export SYSBASE=$ANDROID_NDK_HOME/platforms/android-9/arch-$host_cpu + test -z "$AR" && AR=$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-ar + test -z "$NM" && NM=$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-nm + test -z "$OBJDUMP" && OBJDUMP=$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-objdump + test -z "$RANLIB" && RANLIB=$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-ranlib + test -z "$STRIP" && STRIP=$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-strip + + if test $host_cpu = arm; then + ANDROIDCFLAGS="-march=armv7-a -mfloat-abi=softfp -mfpu=neon -Wl,--fix-cortex-a8 --sysroot $ANDROID_NDK_HOME/platforms/android-9/arch-arm -L$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a" + ANDROIDCXXFLAGS="$ANDROIDCFLAGS -I $ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/include -I$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include" + else # x86 + ANDROIDCFLAGS="-march=atom --sysroot $ANDROID_NDK_HOME/platforms/android-9/arch-x86 -L$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/libs/x86" + ANDROIDCXXFLAGS="$ANDROIDCFLAGS -I $ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/include -I$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/libs/x86/include" + fi + test -z "$CC" && CC="$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-gcc $ANDROIDCFLAGS" + test -z "$CXX" && CXX="$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-g++ $ANDROIDCXXFLAGS" fi AC_SUBST(ANDROID_NDK_HOME) commit f5c1547deb8d47531bd4d3b8dc12fdecff2c59d6 Author: Tor Lillqvist <t...@iki.fi> Date: Mon Jul 30 10:13:09 2012 +0300 --with-android-arch is pointless, that's what host_cpu is for diff --git a/configure.in b/configure.in index 6d9699d..a360fff 100644 --- a/configure.in +++ b/configure.in @@ -120,12 +120,6 @@ AC_ARG_WITH(android-sdk, [Specify location of the Android SDK. Mandatory when building for Android.]), ,) -AC_ARG_WITH(android-arch, - AS_HELP_STRING([--with-android-arch], - [Specify the Android target architecture - default is arm, or try x86]),, - [with_android_arch=arm]) - -ANDROID_ARCH= ANDROID_NDK_HOME= if test -n "$with_android_ndk"; then ANDROID_NDK_HOME=$with_android_ndk @@ -140,22 +134,22 @@ if test -n "$with_android_ndk"; then # possiblity to use the gold linker, which should bring a nice speedup to # linking especially our libmerged. Work to support that in progress. Until # that is done, please use no newer NDK than r8. - if test "$with_android_arch" = "arm"; then - ANDROID_ABI_PREBUILT_BIN=`echo $ANDROID_NDK_HOME/toolchains/$with_android_arch-linux*/prebuilt/*/bin` + if test $host_cpu = arm; then + ANDROID_ABI_PREBUILT_BIN=`echo $ANDROID_NDK_HOME/toolchains/$host_cpu-linux*/prebuilt/*/bin` android_gcc_prefix=arm-linux-androideabi else - ANDROID_ABI_PREBUILT_BIN=`echo $ANDROID_NDK_HOME/toolchains/$with_android_arch-*/prebuilt/*/bin` + ANDROID_ABI_PREBUILT_BIN=`echo $ANDROID_NDK_HOME/toolchains/$host_cpu-*/prebuilt/*/bin` android_gcc_prefix=i686-android-linux fi - test -z "$SYSBASE" && export SYSBASE=$ANDROID_NDK_HOME/platforms/android-9/arch-$with_android_arch + test -z "$SYSBASE" && export SYSBASE=$ANDROID_NDK_HOME/platforms/android-9/arch-$host_cpu test -z "$AR" && AR=$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-ar test -z "$NM" && NM=$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-nm test -z "$OBJDUMP" && OBJDUMP=$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-objdump test -z "$RANLIB" && RANLIB=$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-ranlib test -z "$STRIP" && STRIP=$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-strip - if test "$with_android_arch" = "arm"; then + if test $host_cpu = arm; then ANDROIDCFLAGS="-march=armv7-a -mfloat-abi=softfp -mfpu=neon -Wl,--fix-cortex-a8 --sysroot $ANDROID_NDK_HOME/platforms/android-9/arch-arm -L$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a" ANDROIDCXXFLAGS="$ANDROIDCFLAGS -I $ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/include -I$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include" else # x86 @@ -164,9 +158,7 @@ if test -n "$with_android_ndk"; then fi test -z "$CC" && CC="$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-gcc $ANDROIDCFLAGS" test -z "$CXX" && CXX="$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-g++ $ANDROIDCXXFLAGS" - ANDROID_ARCH=$with_android_arch fi -AC_SUBST(ANDROID_ARCH) AC_SUBST(ANDROID_NDK_HOME) dnl =================================================================== diff --git a/distro-configs/LibreOfficeAndroidX86.conf b/distro-configs/LibreOfficeAndroidX86.conf index 58bac85..44374b5 100644 --- a/distro-configs/LibreOfficeAndroidX86.conf +++ b/distro-configs/LibreOfficeAndroidX86.conf @@ -1,5 +1,4 @@ --host=i686-linux-androideabi ---with-android-arch=x86 --disable-cairo-canvas --disable-cups --disable-ext-pdfimport _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits