From 48e61da922ae61b8e3bf3b3ad605940e557e7e6b Mon Sep 17 00:00:00 2001 From: hubicka Date: Wed, 7 Oct 2009 09:11:28 +0000 Subject: [PATCH] * collect2.c (main): Add -fno-whole-program. * gcc.c (set_collect_gcc_options): Do not remove whole program here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152521 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/collect2.c | 5 +++-- gcc/gcc.c | 5 ----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3a8ac5440a8d..31b4ad7c37ff 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2009-10-07 Jan Hubicka + + * collect2.c (main): Add -fno-whole-program. + * gcc.c (set_collect_gcc_options): Do not remove whole program here. + 2009-10-07 Jan Hubicka * lto-symtab.c (lto_cgraph_replace_node): Assert that inline clones has diff --git a/gcc/collect2.c b/gcc/collect2.c index 20caa451f89c..01ef4317379b 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -1271,8 +1271,8 @@ main (int argc, char **argv) obstack_free (&temporary_obstack, temporary_firstobj); /* -fno-profile-arcs -fno-test-coverage -fno-branch-probabilities - -fno-exceptions -w */ - num_c_args += 5; + -fno-exceptions -w -fno-whole-program */ + num_c_args += 6; c_argv = XCNEWVEC (char *, num_c_args); c_ptr = CONST_CAST2 (const char **, char **, c_argv); @@ -1440,6 +1440,7 @@ main (int argc, char **argv) *c_ptr++ = "-fno-branch-probabilities"; *c_ptr++ = "-fno-exceptions"; *c_ptr++ = "-w"; + *c_ptr++ = "-fno-whole-program"; /* !!! When GCC calls collect2, it does not know whether it is calling collect2 or ld. diff --git a/gcc/gcc.c b/gcc/gcc.c index 033c99fbecc2..d94462d9ac59 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -4636,11 +4636,6 @@ set_collect_gcc_options (void) if ((switches[i].live_cond & SWITCH_IGNORE) != 0) continue; - /* Don't use -fwhole-program when compiling the init and fini routines, - since we'd wrongly assume that the routines aren't needed. */ - if (strcmp (switches[i].part1, "fwhole-program") == 0) - continue; - obstack_grow (&collect_obstack, "'-", 2); q = switches[i].part1; while ((p = strchr (q, '\''))) -- 2.47.2