summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorDave Korn <dave.korn@artimi.com>2010-10-07 20:50:01 +0000
committerDave Korn <dave.korn@artimi.com>2010-10-07 20:50:01 +0000
commite153c17562d7264daa198767831e556e72ef6b66 (patch)
treef14424f3765da3a5f568b8c7d54e1799f35b090f /configure
parentd12c88a45436fef9c8ae360a1cf523ec577f8693 (diff)
downloadbinutils-redhat-e153c17562d7264daa198767831e556e72ef6b66.tar.gz
* configure.ac (build_lto_plugin): New shell variable.
(--enable-lto): Turn on by default for all non-ELF platforms that have had LTO support added so far. Set build_lto_plugin appropriately for both ELF and non-ELF. (configdirs): Add lto-plugin or not based on build_lto_plugin. * configure: Regenerate.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure13
1 files changed, 10 insertions, 3 deletions
diff --git a/configure b/configure
index 7762106f9d..b1fbfaa73d 100755
--- a/configure
+++ b/configure
@@ -6676,11 +6676,13 @@ to specify its location." "$LINENO" 5
# Flags needed for libelf.
+ # ELF platforms build the lto-plugin when GOLD is in use.
+ build_lto_plugin=${ENABLE_GOLD}
fi
else
if test x"$default_enable_lto" = x"yes" ; then
case $target in
- *-apple-darwin*) ;;
+ *-apple-darwin* | *-cygwin* | *-mingw*) ;;
# On other non-ELF platforms, LTO must be explicitly enabled.
*) enable_lto=no ;;
esac
@@ -6691,13 +6693,18 @@ else
# warn during gcc/ subconfigure; unless you're bootstrapping with
# -flto it won't be needed until after installation anyway.
case $target in
- *-cygwin*|*-mingw* | *-apple-darwin*) ;;
+ *-cygwin* | *-mingw* | *-apple-darwin*) ;;
*) if test x"$enable_lto" = x"yes"; then
as_fn_error "LTO support is not enabled for this target." "$LINENO" 5
fi
;;
esac
fi
+ # Among non-ELF, only Windows platforms support the lto-plugin so far.
+ case $target in
+ *-cygwin* | *-mingw*) build_lto_plugin=yes ;;
+ *) ;;
+ esac
default_enable_lto=no
fi
@@ -6778,7 +6785,7 @@ if test -d ${srcdir}/gcc; then
*,lto,*) ;;
*) enable_languages="${enable_languages},lto" ;;
esac
- if test "${ENABLE_GOLD}" = "yes" ; then
+ if test "${build_lto_plugin}" = "yes" ; then
configdirs="$configdirs lto-plugin"
extra_host_libiberty_configure_flags=--enable-shared
fi