diff mbox

compile-i386: Use SPARSE_VERSION instead of __DATE__

Message ID 20170922081410.29162-1-uwe@kleine-koenig.org (mailing list archive)
State Mainlined, archived
Headers show

Commit Message

Uwe Kleine-König Sept. 22, 2017, 8:14 a.m. UTC
The compile date isn't very informative for a tool, the version is what really
matters. Additionally using __DATE__ makes the build unreprodicible.

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
---
 compile-i386.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Luc Van Oostenryck Oct. 2, 2017, 7:47 p.m. UTC | #1
On Fri, Sep 22, 2017 at 10:14:10AM +0200, Uwe Kleine-König wrote:
> The compile date isn't very informative for a tool, the version is what really
> matters. Additionally using __DATE__ makes the build unreprodicible.
> 

Acked-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/compile-i386.c b/compile-i386.c
index e4d3f27dd8a9..1cedcbda73d8 100644
--- a/compile-i386.c
+++ b/compile-i386.c
@@ -57,6 +57,7 @@ 
 #include "target.h"
 #include "compile.h"
 #include "bitmap.h"
+#include "version.h"
 
 struct textbuf {
 	unsigned int	len;	/* does NOT include terminating null */
@@ -691,7 +692,7 @@  void emit_unit_begin(const char *basename)
 void emit_unit_end(void)
 {
 	textbuf_emit(&unit_post_text);
-	printf("\t.ident\t\"sparse silly x86 backend (built %s)\"\n", __DATE__);
+	printf("\t.ident\t\"sparse silly x86 backend (version %s)\"\n", SPARSE_VERSION);
 }
 
 /* conditionally switch sections */