1From b6860ea26851edb599bfe0e2d08d212c6a7aaeec Mon Sep 17 00:00:00 2001
2From: Val Lorentz <progval@progval.net>
3Date: Sun, 29 Jan 2017 17:39:54 -0800
4Subject: [PATCH] Remove date from version info to make build reproducible
5
6Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
7---
8 asm/nasm.c | 4 ++--
9 disasm/ndisasm.c | 4 ++--
10 include/ver.h | 1 -
11 nasmlib/ver.c | 1 -
12 4 files changed, 4 insertions(+), 6 deletions(-)
13
14diff --git a/asm/nasm.c b/asm/nasm.c
15index e5ae89af..70024db5 100644
16--- a/asm/nasm.c
17+++ b/asm/nasm.c
18@@ -977,8 +977,8 @@ static const struct textargs textopts[] = {
19
20 static void show_version(void)
21 {
22- printf("NASM version %s compiled on %s%s\n",
23- nasm_version, nasm_date, nasm_compile_options);
24+ printf("NASM version %s%s\n",
25+ nasm_version, nasm_compile_options);
26 exit(0);
27 }
28
29diff --git a/disasm/ndisasm.c b/disasm/ndisasm.c
30index 01e0c557..7424b282 100644
31--- a/disasm/ndisasm.c
32+++ b/disasm/ndisasm.c
33@@ -120,8 +120,8 @@ int main(int argc, char **argv)
34 case 'r':
35 case 'v':
36 fprintf(stderr,
37- "NDISASM version %s compiled on %s\n",
38- nasm_version, nasm_date);
39+ "NDISASM version %s\n",
40+ nasm_version);
41 return 0;
42 case 'u': /* -u for -b 32, -uu for -b 64 */
43 if (bits < 64)
44diff --git a/include/ver.h b/include/ver.h
45index a5bbf384..7a6ce42a 100644
46--- a/include/ver.h
47+++ b/include/ver.h
48@@ -41,7 +41,6 @@
49 #include "compiler.h"
50
51 extern const char nasm_version[];
52-extern const char nasm_date[];
53 extern const char nasm_compile_options[];
54
55 extern bool reproducible;
56diff --git a/nasmlib/ver.c b/nasmlib/ver.c
57index 96260b6c..8f02eaca 100644
58--- a/nasmlib/ver.c
59+++ b/nasmlib/ver.c
60@@ -36,7 +36,6 @@
61
62 /* This is printed when entering nasm -v */
63 const char nasm_version[] = NASM_VER;
64-const char nasm_date[] = __DATE__;
65 const char nasm_compile_options[] = ""
66 #ifdef DEBUG
67 " with -DDEBUG"
68--
692.28.0
70