Stop the linker's --dependency-file option from including temporary lto files.
authorNick Clifton <nickc@redhat.com>
Wed, 28 Jun 2023 12:49:43 +0000 (13:49 +0100)
committerNick Clifton <nickc@redhat.com>
Wed, 28 Jun 2023 12:49:43 +0000 (13:49 +0100)
  PR 30568
  * ldfile.c (ldfile_try_open_bfd): Do not track lto generated temporary files.

ld/ChangeLog
ld/ldfile.c

index 1467128eb6122cec9891d6b43860e0de40cdc567..084c96dce9628ec49cfc9a1b6e8a57db2c90b0e5 100644 (file)
@@ -1,3 +1,10 @@
+2023-06-28  Nikita Popov  <npopov@redhat.com>
+           Nick Clifton  <nickc@redhat.com>
+
+       PR 30568
+       * ldfile.c (ldfile_try_open_bfd): Do not track lto generated
+       temporary files.
+
 2023-06-21  Nick Clifton  <nickc@redhat.com>
 
        PR 29072
index 4976367bbf03b09df6e5625a676acb309e1f30ea..c8a6874978b3653143dc81b40d02028d6c27433d 100644 (file)
@@ -352,7 +352,9 @@ ldfile_try_open_bfd (const char *attempt,
       return false;
     }
 
-  track_dependency_files (attempt);
+  /* PR 30568: Do not track lto generated temporary object files.  */
+  if (!entry->flags.lto_output)
+    track_dependency_files (attempt);
 
   /* Linker needs to decompress sections.  */
   entry->the_bfd->flags |= BFD_DECOMPRESS;