0005-mips-reproducible.patch 927 B

123456789101112131415161718192021
  1. [PATCH] fix deterministic output for mips archiver
  2. for historical reasons mips uses a slightly different archive format,
  3. and when the --enable-deterministic-archives option was implemented,
  4. it was only done for the generic archive format, but not for the one
  5. used by mips.
  6. Signed-off-by: John Spencer <[email protected]>
  7. --- binutils-2.24.90.org/bfd/archive64.c
  8. +++ binutils-2.24.90/bfd/archive64.c
  9. @@ -171,7 +171,8 @@
  10. if (!_bfd_ar_sizepad (hdr.ar_size, sizeof (hdr.ar_size), mapsize))
  11. return FALSE;
  12. _bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld",
  13. - time (NULL));
  14. + ((arch->flags & BFD_DETERMINISTIC_OUTPUT) == 0
  15. + ? time (NULL) : 0));
  16. /* This, at least, is what Intel coff sets the values to.: */
  17. _bfd_ar_spacepad (hdr.ar_uid, sizeof (hdr.ar_uid), "%ld", 0);
  18. _bfd_ar_spacepad (hdr.ar_gid, sizeof (hdr.ar_gid), "%ld", 0);