From fa132e010406d9b999dc681c8d3c3f474d1cd407 Mon Sep 17 00:00:00 2001 From: rofl0r Date: Sun, 17 Feb 2019 14:11:46 +0000 Subject: [PATCH] binutils 2.27: add patch so reproducible builds work even on mips --- .../0005-mips-reproducible.patch | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 patches/binutils-2.27/0005-mips-reproducible.patch diff --git a/patches/binutils-2.27/0005-mips-reproducible.patch b/patches/binutils-2.27/0005-mips-reproducible.patch new file mode 100644 index 0000000..5b92ce7 --- /dev/null +++ b/patches/binutils-2.27/0005-mips-reproducible.patch @@ -0,0 +1,21 @@ +[PATCH] fix deterministic output for mips archiver + +for historical reasons mips uses a slightly different archive format, +and when the --enable-deterministic-archives option was implemented, +it was only done for the generic archive format, but not for the one +used by mips. + +Signed-off-by: John Spencer + +--- binutils-2.24.90.org/bfd/archive64.c ++++ binutils-2.24.90/bfd/archive64.c +@@ -171,7 +171,8 @@ + if (!_bfd_ar_sizepad (hdr.ar_size, sizeof (hdr.ar_size), mapsize)) + return FALSE; + _bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld", +- time (NULL)); ++ ((arch->flags & BFD_DETERMINISTIC_OUTPUT) == 0 ++ ? time (NULL) : 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);