configure.ac | 38 ++++++++++++++++++++---------------- external/icu/ExternalProject_icu.mk | 3 +- 2 files changed, 24 insertions(+), 17 deletions(-)
New commits: commit 253ffdf2b0c22247e6208e0881838b1896c63116 Author: Tor Lillqvist <t...@collabora.com> Date: Wed Apr 16 13:00:25 2014 +0300 Pass -flto as part of CC and CXX when building external libs for Android Using -flto and Clang still doesn't work, though, build stops already in fontconfig. The linker claims the expat library doesn't have an archive symbol table. Go figure, oh well, won't bother trying any more for now. Change-Id: Icbd65269e958665704104322e66a5b3a78fac75e diff --git a/configure.ac b/configure.ac index 44d432e..eaa46b5 100644 --- a/configure.ac +++ b/configure.ac @@ -391,6 +391,12 @@ if test -n "$with_android_ndk"; then ;; esac + if test "$ENABLE_LTO" = TRUE; then + # -flto comes from com_GCC_degs.mk, too, but we need to make sure it gets passed as part of + # $CC and $CXX when building external libraries + ANDROIDCFLAGS="$ANDROIDCFLAGS -flto" + fi + # gdbserver can be in different locations if test -f $ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-4.4.3/prebuilt/gdbserver; then ANDROID_NDK_GDBSERVER=$ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-4.4.3/prebuilt/gdbserver commit 3ac1663a60926ab2f3fbbd1219455e37d5a83b45 Author: Tor Lillqvist <t...@collabora.com> Date: Wed Apr 16 12:02:10 2014 +0300 No use to build tools or extras when cross-compiling Also, for some reason building the endian check thing fails when trying to use Clang for Android, so just hardcode it. Change-Id: I04fb7ba4f88a1dc6a4e743b39e7c0cd19d7e3598 diff --git a/external/icu/ExternalProject_icu.mk b/external/icu/ExternalProject_icu.mk index 4450260..8f1104e 100644 --- a/external/icu/ExternalProject_icu.mk +++ b/external/icu/ExternalProject_icu.mk @@ -77,8 +77,9 @@ $(call gb_ExternalProject_get_state_target,icu,build) : CXXFLAGS=$(icu_CXXFLAGS) LDFLAGS=$(icu_LDFLAGS) \ ./configure \ --disable-layout --disable-samples \ + $(if $(CROSS_COMPILING),--disable-tools --disable-extras) \ $(if $(filter IOS ANDROID,$(OS)),--disable-dyload) \ - $(if $(filter ANDROID,$(OS)),--disable-strict) \ + $(if $(filter ANDROID,$(OS)),--disable-strict ac_cv_c_bigendian=no) \ $(if $(filter SOLARIS AIX,$(OS)),--disable-64bit-libs) \ $(if $(filter TRUE,$(DISABLE_DYNLOADING)),\ --enable-static --disable-shared,\ commit 9eb25b0fb9606b7740ba92697fbd5acf34dd9154 Author: Tor Lillqvist <t...@collabora.com> Date: Wed Apr 16 12:01:51 2014 +0300 Probably not a good idea to use gold with LTO Change-Id: I72559ebabecad288f4c56bb9ff1eddbb498a2d35 diff --git a/configure.ac b/configure.ac index bc4206a..44d432e 100644 --- a/configure.ac +++ b/configure.ac @@ -208,6 +208,19 @@ if test -z "$SED"; then AC_MSG_ERROR([install sed to run this script]) fi +# Set the ENABLE_LTO variable +# =================================================================== +AC_MSG_CHECKING([whether to use link-time optimization]) +if test -n "$enable_lto" -a "$enable_lto" != "no"; then + ENABLE_LTO="TRUE" + AC_MSG_RESULT([yes]) + AC_DEFINE(STATIC_LINKING) +else + ENABLE_LTO="" + AC_MSG_RESULT([no]) +fi +AC_SUBST(ENABLE_LTO) + dnl =================================================================== dnl When building for Android, --with-android-ndk, dnl --with-android-ndk-toolchain-version and --with-android-sdk are @@ -372,7 +385,7 @@ if test -n "$with_android_ndk"; then case "$with_android_ndk_toolchain_version" in 4.[[6789]]*|[[56789]].*|clang*) # The NDK doesn't have ld.gold for MIPS for some reason - if test "$host_cpu" != mips; then + if test "$host_cpu" != mips -a "$ENABLE_LTO" != TRUE; then ANDROIDCFLAGS="$ANDROIDCFLAGS -fuse-ld=gold" fi ;; @@ -2536,19 +2549,6 @@ if test "$COMPATH" = "."; then fi COMPATH=`echo $COMPATH | $SED "s@/[[Bb]][[Ii]][[Nn]]\\\$@@"` -# Set the ENABLE_LTO variable -# =================================================================== -AC_MSG_CHECKING([whether to use link-time optimization]) -if test -n "$enable_lto" -a "$enable_lto" != "no"; then - ENABLE_LTO="TRUE" - AC_MSG_RESULT([yes]) - AC_DEFINE(STATIC_LINKING) -else - ENABLE_LTO="" - AC_MSG_RESULT([no]) -fi -AC_SUBST(ENABLE_LTO) - dnl =================================================================== dnl Java support dnl =================================================================== commit c32f6050bd41e4b404002593d1e95558f8db4a35 Author: Tor Lillqvist <t...@collabora.com> Date: Wed Apr 16 11:48:34 2014 +0300 Use the 4.8 gcc toolchain in conjunction with Clang for Android That's what the $NDK/toolchains/arm-linux-androideabi-clang3.4/setup.mk does, too. Change-Id: I90555bc5f026761ebcf7a2dce650382b6c0d94da diff --git a/configure.ac b/configure.ac index 05a2931..bc4206a 100644 --- a/configure.ac +++ b/configure.ac @@ -272,7 +272,7 @@ if test -n "$with_android_ndk"; then ;; clang3.3|clang3.4) AC_MSG_WARN([Building with the Clang tool-chain is known to break in the bridges module, fix that please]) - ANDROID_BINUTILS_DIR=$ANDROID_NDK_HOME/toolchains/$android_platform_prefix-4.6 + ANDROID_BINUTILS_DIR=$ANDROID_NDK_HOME/toolchains/$android_platform_prefix-4.8 ANDROID_COMPILER_DIR=$ANDROID_NDK_HOME/toolchains/llvm-${with_android_ndk_toolchain_version#clang} ANDROID_USING_CLANG=true ;; @@ -314,7 +314,7 @@ if test -n "$with_android_ndk"; then */bin\ */bin*) # Trailing slash intentional and necessary, compare to how this is used if test -n "$ANDROID_USING_CLANG"; then - ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR=4.6/ + ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR=4.8/ else ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR="${with_android_ndk_toolchain_version}/" fi _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits