OSDN Git Service

gcc/
[pf3gnuchains/gcc-fork.git] / gcc / gcc.c
index 538be05..f0d986c 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -4434,6 +4434,11 @@ 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, '\'')))