From fe95fbf90773ebf53740e46a38ea5e923233a25b Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Fri, 7 Jan 2011 19:21:00 +0100 Subject: [PATCH] re PR lto/45375 ([meta-bug] Issues with building Mozilla (i.e. Firefox) with LTO) PR lto/45375 * lto-opt.c (lto_reissue_options): Set flag_shlib. From-SVN: r168580 --- gcc/ChangeLog | 5 +++++ gcc/lto-opts.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 54c14cc9236c..238eef6c6758 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-01-07 Jan Hubicka + + PR lto/45375 + * lto-opt.c (lto_reissue_options): Set flag_shlib. + 2011-01-07 Iain Sandoe * target.def (function_switched_text_sections): New Hook. diff --git a/gcc/lto-opts.c b/gcc/lto-opts.c index 40a5db0f8a8a..3f80e91b5b13 100644 --- a/gcc/lto-opts.c +++ b/gcc/lto-opts.c @@ -420,5 +420,9 @@ lto_reissue_options (void) gcc_unreachable (); } + /* Flag_shlib is usually set by finish_options, but we are issuing flag_pic + too late. */ + if (flag_pic && !flag_pie) + flag_shlib = 1; VEC_free (opt_t, heap, opts); }