From 9eb25b0fb9606b7740ba92697fbd5acf34dd9154 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Wed, 16 Apr 2014 12:01:51 +0300 Subject: Probably not a good idea to use gold with LTO Change-Id: I72559ebabecad288f4c56bb9ff1eddbb498a2d35 --- configure.ac | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index bc4206ad650a..44d432e577a0 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 =================================================================== -- cgit