summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-04-16 12:01:51 +0300
committerTor Lillqvist <tml@collabora.com>2014-04-16 13:06:05 +0300
commit9eb25b0fb9606b7740ba92697fbd5acf34dd9154 (patch)
tree376090dfc8aed1426baaf8b04f72f9fcf6219558 /configure.ac
parentc32f6050bd41e4b404002593d1e95558f8db4a35 (diff)
Probably not a good idea to use gold with LTO
Change-Id: I72559ebabecad288f4c56bb9ff1eddbb498a2d35
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac28
1 files changed, 14 insertions, 14 deletions
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 ===================================================================