From adbf0ff180e2f2f53a635eb2287ab2b2497e5a0d Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Fri, 28 Jan 2011 18:53:37 +0100 Subject: cc/gcc: enable plugins if needed Enabling plugins in binutils is not enough, and gcc also needs to be ./configured with --enable-plugins, although this is not documented anywhere... :-/ Reported-by: karthik duraisami Signed-off-by: "Yann E. MORIN" --- config/cc/gcc.in | 22 ++++++++++++++++++++++ config/cc/gcc.in.2 | 8 ++++++++ 2 files changed, 30 insertions(+) (limited to 'config') diff --git a/config/cc/gcc.in b/config/cc/gcc.in index eb69f975..3c18b8be 100644 --- a/config/cc/gcc.in +++ b/config/cc/gcc.in @@ -164,10 +164,32 @@ config CC_GCC_HAS_GRAPHITE bool default n +# The way LTO works is a bit twisted. +# See: http://gcc.gnu.org/wiki/LinkTimeOptimization#Requirements +# Basically: +# - if binutils has plugins: LTO is handled by ld/gold by loading +# the plugin when linking +# - if binutils does not have plugins: LTO is handled by collect2 +# In any case, LTO support does not depend on plugins, but takes +# advantage of it config CC_GCC_HAS_LTO bool default n +# Only enable gcc's support for plugins if binutils has it as well +# They are usefull only when doing LTO, but it does no harm enabling +# them even without LTO. +config CC_GCC_ENABLE_PLUGINS + bool + depends on BINUTILS_PLUGINS + default y + +# If binutils installs gold, enable support for gold in gcc +config CC_GCC_GOLD + bool + depends on BINUTILS_GOLD_INSTALLED + default y + config CC_GCC_USE_GMP_MPFR bool default n diff --git a/config/cc/gcc.in.2 b/config/cc/gcc.in.2 index 9e08689a..642ea5be 100644 --- a/config/cc/gcc.in.2 +++ b/config/cc/gcc.in.2 @@ -24,6 +24,14 @@ config CC_GCC_USE_GRAPHITE On some systems (eg. Cygwin), PPL and/or CLooG may not build properly (yet), so you'll have to say 'N' here. +# The way LTO works is a bit twisted. +# See: http://gcc.gnu.org/wiki/LinkTimeOptimization#Requirements +# Basically: +# - if binutils has plugins: LTO is handled by ld/gold by loading +# the plugin when linking +# - if binutils does not have plugins: LTO is handled by collect2 +# In any case, LTO support does not depend on plugins, but takes +# advantage of it config CC_GCC_USE_LTO bool prompt "Enable LTO" -- cgit v1.2.3