]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2010-05-09 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 9 May 2010 14:14:27 +0000 (14:14 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 9 May 2010 14:14:27 +0000 (14:14 +0000)
* gcc.c (store_arg): Handle temporary file deletion for
joined arguments.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159201 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/gcc.c

index 3112b80b01356d11d3b327bb0899bb47d258f930..bd64d9daec0787d8bc77d082b0380aa13c56e71a 100644 (file)
@@ -1,3 +1,8 @@
+2010-05-09  Richard Guenther  <rguenther@suse.de>
+
+       * gcc.c (store_arg): Handle temporary file deletion for
+       joined arguments.
+
 2010-05-09  Richard Guenther  <rguenther@suse.de>
 
        PR middle-end/44043
index a0083e1d0f66be9292bf89759b822f5603abe5a8..e2644c4a73ec7455a59c4a696db37aaf68bd8e0c 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -2082,7 +2082,15 @@ store_arg (const char *arg, int delete_always, int delete_failure)
   if (strcmp (arg, "-o") == 0)
     have_o_argbuf_index = argbuf_index;
   if (delete_always || delete_failure)
-    record_temp_file (arg, delete_always, delete_failure);
+    {
+      const char *p;
+      /* If the temporary file we should delete is specified as
+        part of a joined argument extract the filename.  */
+      if (arg[0] == '-'
+         && (p = strrchr (arg, '=')))
+       arg = p + 1;
+      record_temp_file (arg, delete_always, delete_failure);
+    }
 }
 \f
 /* Load specs from a file name named FILENAME, replacing occurrences of