diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-12 15:47:29 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-12 15:47:29 +0000 |
commit | 0f8cfb362f58b7d0d0a0f742459e6c33c4e38f57 (patch) | |
tree | 854151fb4c00fe11201e919c9c91ad15f623500e /gcc/gcc.c | |
parent | 5211f29ae27dcf38942a16b8052f0510431aab8b (diff) | |
download | gcc-0f8cfb362f58b7d0d0a0f742459e6c33c4e38f57.tar.gz |
PR driver/47244
* gcc.c (PLUGIN_COND): Update to disable plugin unless -flto is used.
(PLUGIN_COND_CLOSE): New macro.
(LINK_COMMAND_SPEC): Update to use PLUGIN_COND_CLOSE.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168717 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r-- | gcc/gcc.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c index 9532d7efd8b..ea3403b5ca9 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -621,11 +621,18 @@ proper position among the other output files. */ # endif #endif -/* Conditional to test whether plugin is used or not. */ +/* Conditional to test whether plugin is used or not. + FIXME: For slim LTO we will need to enable plugin unconditionally. This + still cause problems with PLUGIN_LD != LD and when plugin is built but + not useable. For GCC 4.6 we don't support slim LTO and thus we can enable + plugin only when LTO is enabled. We still honor explicit + -fuse-linker-plugin. */ #ifdef HAVE_LTO_PLUGIN -#define PLUGIN_COND "!fno-use-linker-plugin" +#define PLUGIN_COND "!fno-use-linker-plugin:%{flto|flto=*|fuse-linker-plugin" +#define PLUGIN_COND_CLOSE "}" #else #define PLUGIN_COND "fuse-linker-plugin" +#define PLUGIN_COND_CLOSE "" #endif @@ -646,9 +653,9 @@ proper position among the other output files. */ -plugin-opt=%(lto_wrapper) \ -plugin-opt=-fresolution=%u.res \ %{!nostdlib:%{!nodefaultlibs:%:pass-through-libs(%(link_gcc_c_sequence))}} \ - } \ - %{flto*:%<fcompare-debug*} \ - %{flto*} %l " LINK_PIE_SPEC \ + }"PLUGIN_COND_CLOSE" \ + %{flto|flto=*:%<fcompare-debug*} \ + %{flto} %{flto=*} %l " LINK_PIE_SPEC \ "%X %{o*} %{e*} %{N} %{n} %{r}\ %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}}\ %{static:} %{L*} %(mfwrap) %(link_libgcc) %o\ |