Hi,

please consider the attached patch to help make tboot builds reproducible. Currently using -Werror -Wdate-time causes the build to fail.

The option -Wdate-time is described as:

    "Warn when macros __TIME__, __DATE__ or __TIMESTAMP__ are encountered
     as they might prevent bit-wise-identical reproducible compilations."




-Timo
# HG changeset patch
# User Timo Lindfors <timo.lindf...@iki.fi>
# Date 1655482017 -10800
#      Fri Jun 17 19:06:57 2022 +0300
# Node ID 0d80fadebdf1abd3503a8f4911bfb72de352cd73
# Parent  2bd7c7a33d49ffeb01edd0306b581b9f320316e6
Remove references to __DATE__ to make the build reproducible

diff -r 2bd7c7a33d49 -r 0d80fadebdf1 lcptools-v2/crtpol.c
--- a/lcptools-v2/crtpol.c	Fri Jun 17 11:39:11 2022 +0300
+++ b/lcptools-v2/crtpol.c	Fri Jun 17 19:06:57 2022 +0300
@@ -780,8 +780,8 @@
     }
 
     else if ( cmd == 'V' ) /* --version */ {
-        DISPLAY("lcp2_crtpol version: %i.%i\nBuild date: %s", TOOL_VER_MAJOR,
-                                                    TOOL_VER_MINOR, __DATE__);
+        DISPLAY("lcp2_crtpol version: %i.%i", TOOL_VER_MAJOR,
+                                              TOOL_VER_MINOR);
         return 0;
     }
 
diff -r 2bd7c7a33d49 -r 0d80fadebdf1 lcptools-v2/crtpolelt.c
--- a/lcptools-v2/crtpolelt.c	Fri Jun 17 11:39:11 2022 +0300
+++ b/lcptools-v2/crtpolelt.c	Fri Jun 17 19:06:57 2022 +0300
@@ -261,8 +261,8 @@
     }
 
     else if ( cmd == 'V' ) /* --version */ {
-        DISPLAY("lcp2_crtpolelt version: %i.%i\nBuild date: %s", TOOL_VER_MAJOR,
-                                                    TOOL_VER_MINOR, __DATE__);
+        DISPLAY("lcp2_crtpolelt version: %i.%i", TOOL_VER_MAJOR,
+                                                 TOOL_VER_MINOR);
         return 0;
     }
 
diff -r 2bd7c7a33d49 -r 0d80fadebdf1 lcptools-v2/crtpollist.c
--- a/lcptools-v2/crtpollist.c	Fri Jun 17 11:39:11 2022 +0300
+++ b/lcptools-v2/crtpollist.c	Fri Jun 17 19:06:57 2022 +0300
@@ -735,8 +735,8 @@
         return verify();
     }
     else if ( cmd == 'v' ) { /* --version */
-        DISPLAY("lcp2_crtpollist version: %i.%i\nBuild date: %s", TOOL_VER_MAJOR,
-                                                    TOOL_VER_MINOR, __DATE__);
+        DISPLAY("lcp2_crtpollist version: %i.%i", TOOL_VER_MAJOR,
+                                                  TOOL_VER_MINOR);
         return 0;
     }
 
diff -r 2bd7c7a33d49 -r 0d80fadebdf1 lcptools-v2/mlehash.c
--- a/lcptools-v2/mlehash.c	Fri Jun 17 11:39:11 2022 +0300
+++ b/lcptools-v2/mlehash.c	Fri Jun 17 19:06:57 2022 +0300
@@ -490,8 +490,8 @@
     }
 
     else if ( cmd == 'V' ) /* --version */ {
-        DISPLAY("lcp2_mlehash version: %i.%i\nBuild date: %s", TOOL_VER_MAJOR,
-                                                    TOOL_VER_MINOR, __DATE__);
+        DISPLAY("lcp2_mlehash version: %i.%i", TOOL_VER_MAJOR,
+                                               TOOL_VER_MINOR);
         ret = 0;
         goto out;
     }
_______________________________________________
tboot-devel mailing list
tboot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tboot-devel

Reply via email to