https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110710

--- Comment #12 from peter0x44 at disroot dot org ---
diff --git a/gcc/lto-wrapper.cc b/gcc/lto-wrapper.cc
index 5186d040ce0..7119157d830 100644
--- a/gcc/lto-wrapper.cc
+++ b/gcc/lto-wrapper.cc
@@ -2024,9 +2024,7 @@ cont:
                 truncate them as soon as we have processed it.  This
                 reduces temporary disk-space usage.  */
              if (! save_temps)
-               fprintf (mstream, "\t@-touch -r \"%s\" \"%s.tem\" > /dev/null "
-                        "2>&1 && mv \"%s.tem\" \"%s\"\n",
-                        input_name, input_name, input_name, input_name);
+               fprintf (mstream, "\t@-copy /y nul \"%s\"" input_name);
            }
          else
            {

This experimental patch works for me, it doesn't seem to matter if the
timestamp gets updated. I guess what's left to do is write code that runs "sh
-c "true"" to determine if there is an sh.exe present, and then emit the
correct fragment to truncate the file.

Reply via email to