[binutils-gdb] When setting the date stamp on an archive, honor the SOURCE_DATE_EPOCH environment variable
Nick Clifton
nickc@sourceware.org
Tue Apr 21 14:00:46 GMT 2026
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a2dd0aa39f9f95da718b375662b8c62f4d8ce833
commit a2dd0aa39f9f95da718b375662b8c62f4d8ce833
Author: Manuel Jacob <me@manueljacob.de>
Date: Tue Apr 21 14:59:50 2026 +0100
When setting the date stamp on an archive, honor the SOURCE_DATE_EPOCH environment variable
Diff:
---
bfd/archive.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bfd/archive.c b/bfd/archive.c
index db978dfea2c..44030eb3d63 100644
--- a/bfd/archive.c
+++ b/bfd/archive.c
@@ -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);
More information about the Binutils-cvs
mailing list