]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
When setting the date stamp on an archive, honor the SOURCE_DATE_EPOCH environment...
authorManuel Jacob <me@manueljacob.de>
Tue, 21 Apr 2026 13:59:50 +0000 (14:59 +0100)
committerNick Clifton <nickc@redhat.com>
Tue, 21 Apr 2026 13:59:50 +0000 (14:59 +0100)
bfd/archive.c

index db978dfea2c53d1469d396c96cf0e4927d5d1599..44030eb3d637ace4dd052e2ea752174b81469517 100644 (file)
@@ -2915,7 +2915,7 @@ _bfd_coff_write_armap (bfd *arch,
     return false;
   _bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld",
                    ((arch->flags & BFD_DETERMINISTIC_OUTPUT) == 0
-                    ? time (NULL) : 0));
+                    ? bfd_get_current_time (0) : 0));
   /* This, at least, is what Intel coff sets the values to.  */
   _bfd_ar_spacepad (hdr.ar_uid, sizeof (hdr.ar_uid), "%ld", 0);
   _bfd_ar_spacepad (hdr.ar_gid, sizeof (hdr.ar_gid), "%ld", 0);