OSDN Git Service

Do not rewrite out of SSA scalar dependences crossing the limits of the scop.
[pf3gnuchains/gcc-fork.git] / gcc / collect2.c
index a8cd232..0b47027 100644 (file)
@@ -30,10 +30,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
-#include <signal.h>
-#if ! defined( SIGCHLD ) && defined( SIGCLD )
-#  define SIGCHLD SIGCLD
-#endif
 
 /* TARGET_64BIT may be defined to use driver specific functionality. */
 #undef TARGET_64BIT
@@ -822,7 +818,7 @@ static void
 prefix_from_env (const char *env, struct path_prefix *pprefix)
 {
   const char *p;
-  GET_ENVIRONMENT (p, env);
+  p = getenv (env);
 
   if (p)
     prefix_from_string (p, pprefix);
@@ -954,7 +950,7 @@ maybe_run_lto_and_relink (char **lto_ld_argv, char **object_lst,
       size_t num_files;
 
       if (!lto_wrapper)
-       fatal ("COLLECT_LTO_WRAPPER must be set.");
+       fatal ("COLLECT_LTO_WRAPPER must be set");
 
       num_lto_c_args++;
 
@@ -1150,8 +1146,6 @@ main (int argc, char **argv)
   int num_c_args;
   char **old_argv;
 
-  bool use_verbose = false;
-
   old_argv = argv;
   expandargv (&argc, &argv);
   if (argv != old_argv)
@@ -1196,29 +1190,24 @@ main (int argc, char **argv)
 
   /* Parse command line early for instances of -debug.  This allows
      the debug flag to be set before functions like find_a_file()
-     are called.  We also look for the -flto or -fwhopr flag to know
+     are called.  We also look for the -flto or -flto-partition=none flag to know
      what LTO mode we are in.  */
   {
     int i;
+    bool no_partition = false;
 
     for (i = 1; argv[i] != NULL; i ++)
       {
        if (! strcmp (argv[i], "-debug"))
          debug = true;
-        else if (! strcmp (argv[i], "-flto") && ! use_plugin)
-         {
-           use_verbose = true;
-           lto_mode = LTO_MODE_LTO;
-         }
-        else if (! strncmp (argv[i], "-fwhopr", 7) && ! use_plugin)
-         {
-           use_verbose = true;
-           lto_mode = LTO_MODE_WHOPR;
-         }
+        else if (! strcmp (argv[i], "-flto-partition=none"))
+         no_partition = true;
+        else if ((! strncmp (argv[i], "-flto=", 6)
+                 || ! strcmp (argv[i], "-flto")) && ! use_plugin)
+         lto_mode = LTO_MODE_WHOPR;
         else if (! strcmp (argv[i], "-plugin"))
          {
            use_plugin = true;
-           use_verbose = true;
            lto_mode = LTO_MODE_NONE;
          }
 #ifdef COLLECT_EXPORT_LIST
@@ -1239,6 +1228,8 @@ main (int argc, char **argv)
 #endif
       }
     vflag = debug;
+    if (no_partition)
+      lto_mode = LTO_MODE_LTO;
   }
 
 #ifndef DEFAULT_A_OUT_NAME
@@ -1431,11 +1422,6 @@ main (int argc, char **argv)
              *c_ptr++ = xstrdup (q);
            }
        }
-      if (use_verbose && *q == '-' && q[1] == 'v' && q[2] == 0)
-       {
-         /* Turn on trace in collect2 if needed.  */
-         vflag = true;
-       }
     }
   obstack_free (&temporary_obstack, temporary_firstobj);
   *c_ptr++ = "-fno-profile-arcs";
@@ -1485,8 +1471,7 @@ main (int argc, char **argv)
              break;
 
             case 'f':
-             if (strcmp (arg, "-flto") == 0
-                 || strncmp (arg, "-fwhopr", 7) == 0)
+             if (strncmp (arg, "-flto", 5) == 0)
                {
 #ifdef ENABLE_LTO
                  /* Do not pass LTO flag to the linker. */
@@ -1698,16 +1683,16 @@ main (int argc, char **argv)
 
   if (helpflag)
     {
-      fprintf (stderr, "Usage: collect2 [options]\n");
-      fprintf (stderr, " Wrap linker and generate constructor code if needed.\n");
-      fprintf (stderr, " Options:\n");
-      fprintf (stderr, "  -debug          Enable debug output\n");
-      fprintf (stderr, "  --help          Display this information\n");
-      fprintf (stderr, "  -v, --version   Display this program's version number\n");
-      fprintf (stderr, "Overview: http://gcc.gnu.org/onlinedocs/gccint/Collect2.html\n");
-      fprintf (stderr, "Report bugs: %s\n", bug_report_url);
-
-      collect_exit (0);
+      printf ("Usage: collect2 [options]\n");
+      printf (" Wrap linker and generate constructor code if needed.\n");
+      printf (" Options:\n");
+      printf ("  -debug          Enable debug output\n");
+      printf ("  --help          Display this information\n");
+      printf ("  -v, --version   Display this program's version number\n");
+      printf ("\n");
+      printf ("Overview: http://gcc.gnu.org/onlinedocs/gccint/Collect2.html\n");
+      printf ("Report bugs: %s\n", bug_report_url);
+      printf ("\n");
     }
 
   if (debug)