]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* collect2.c (main): Add -fno-whole-program.
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Oct 2009 09:11:28 +0000 (09:11 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Oct 2009 09:11:28 +0000 (09:11 +0000)
* 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
gcc/collect2.c
gcc/gcc.c

index 3a8ac5440a8dc079a1bd5a0b2d363af18b426bef..31b4ad7c37ffbd9f367444291e715a9a8bb4ce39 100644 (file)
@@ -1,3 +1,8 @@
+2009-10-07  Jan Hubicka  <jh@suse.cz>
+
+       * collect2.c (main): Add -fno-whole-program.
+       * gcc.c (set_collect_gcc_options): Do not remove whole program here.
+
 2009-10-07  Jan Hubicka  <jh@suse.cz>
 
        * lto-symtab.c (lto_cgraph_replace_node): Assert that inline clones has
index 20caa451f89ce8fc15f6b80c5f0ee6ca9446da9b..01ef4317379ba877fe1da8f348b5e867ca024b43 100644 (file)
@@ -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.
index 033c99fbecc280c9243318a6302ed87f9ad37337..d94462d9ac59eead720bf9749374bcf9ff982f5b 100644 (file)
--- 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, '\'')))