blob: 665f3afc9f63ee89dfd1dd68d8bd95d3bcd35c83 [file] [log] [blame]
From 19fffab74a201dc41c3da7e74d86eafa8f68bbc6 Mon Sep 17 00:00:00 2001
From: Oleh Matiusha <omatiush@cisco.com>
Date: Tue, 6 Feb 2024 09:34:26 +0000
Subject: [PATCH] yasm: Use BUILD_DATE for reproducibility
Use reproducible build date instead of compilation time and date.
Signed-off-by: Oleh Matiusha <omatiush@cisco.com>
---
tools/re2c/parser.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/re2c/parser.c b/tools/re2c/parser.c
index 02d5c66..1c90aee 100644
--- a/tools/re2c/parser.c
+++ b/tools/re2c/parser.c
@@ -5,6 +5,7 @@
#include "tools/re2c/globals.h"
#include "tools/re2c/parse.h"
#include "tools/re2c/parser.h"
+#include "config.h"
int yylex(void);
static RegExp *parse_expr(void);
@@ -233,7 +234,11 @@ void parse(FILE *i, FILE *o){
peektok = NONE;
fputs("/* Generated by re2c 0.9.1-C on ", o);
+#ifndef BUILD_DATE
fprintf(o, "%-24s", ctime(&now));
+#else
+ fprintf(o, "%-24s", BUILD_DATE " ");
+#endif
fputs(" */\n", o); oline+=2;
in = Scanner_new(i);
--
2.33.0