Check HOST_BIT_BUCKET when settting dump base/dir.
authorH.J. Lu <hongjiu.lu@intel.com>
Tue, 1 Feb 2011 14:42:08 +0000 (14:42 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Tue, 1 Feb 2011 14:42:08 +0000 (06:42 -0800)
2011-02-01  H.J. Lu  <hongjiu.lu@intel.com>

PR driver/47547
* lto-wrapper.c (run_gcc): Don't add -dumpdir if linker_output
is HOST_BIT_BUCKET.

* opts.c (finish_options): Don't add x_aux_base_name if it is
HOST_BIT_BUCKET.

From-SVN: r169479

gcc/ChangeLog
gcc/lto-wrapper.c
gcc/opts.c

index 8f43325b6e70d54a5b25ad73cc2652fdb0ebe701..302867cd5f3e16c6e706da2202d3bdd8a60c50e9 100644 (file)
@@ -1,3 +1,12 @@
+2011-02-01  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR driver/47547
+       * lto-wrapper.c (run_gcc): Don't add -dumpdir if linker_output
+       is HOST_BIT_BUCKET.
+
+       * opts.c (finish_options): Don't add x_aux_base_name if it is
+       HOST_BIT_BUCKET.
+
 2011-02-01  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/47555
index 6f106a31f453e8d11b34d6e2c67c22e40f74d0ed..613c7b054df9aaff3c9b99de632b2838479bbac3 100644 (file)
@@ -392,6 +392,7 @@ run_gcc (unsigned argc, char *argv[])
   if (linker_output)
     {
       char *output_dir, *base, *name;
+      bool bit_bucket = strcmp (linker_output, HOST_BIT_BUCKET) == 0;
 
       output_dir = xstrdup (linker_output);
       base = output_dir;
@@ -406,8 +407,11 @@ run_gcc (unsigned argc, char *argv[])
          static char current_dir[] = { '.', DIR_SEPARATOR, '\0' };
          output_dir = current_dir;
        }
-      *argv_ptr++ = "-dumpdir";
-      *argv_ptr++ = output_dir;
+      if (!bit_bucket)
+       {
+         *argv_ptr++ = "-dumpdir";
+         *argv_ptr++ = output_dir;
+       }
 
       *argv_ptr++ = "-dumpbase";
     }
index b958a091e8527d3a03f9dc2151031ec1cbdc17dc..9a3fb133a31df3403279fc423a9a481bd9d4b25d 100644 (file)
@@ -633,7 +633,8 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
       if (opts->x_dump_dir_name)
        opts->x_dump_base_name = concat (opts->x_dump_dir_name,
                                         opts->x_dump_base_name, NULL);
-      else if (opts->x_aux_base_name)
+      else if (opts->x_aux_base_name
+              && strcmp (opts->x_aux_base_name, HOST_BIT_BUCKET) != 0)
        {
          const char *aux_base;