This is an automated email from Gerrit.

"Sofiane HAMAM <sofiane.ha...@smile.fr>" just uploaded a new patch set to 
Gerrit, which you can find at https://review.openocd.org/c/openocd/+/8620

-- gerrit

commit 43a85dfafac7240f85ee5369fd666196ad231090
Author: Sofiane HAMAM <sofiane.ha...@smile.fr>
Date:   Thu Mar 27 10:15:56 2025 +0100

    configure: Use SOURCE_DATE_EPOCH environment variable
    
    This package defines PKGBLDDATE as build timestamp which makes
    it non reproducible. Use SOURCE_DATE_EPOCH if it is found, otherwise
    use build timestamp. Following best practices, see :
    https://reproducible-builds.org/docs/source-date-epoch/
    
    Yocto, Fedora and others projects need this for reproducibility.
    
    Change-Id: I7c8407620965c7ca96863ebded9df20f5ee8365c
    Signed-off-by: Sofiane HAMAM <sofiane.ha...@smile.fr>

diff --git a/configure.ac b/configure.ac
index 75c8e5d8a7..e60102f662 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,6 +42,11 @@ AC_DISABLE_SHARED
 LT_INIT
 AC_SUBST([LIBTOOL_DEPS])
 
+# SDE = SOURCE_DATE_EPOCH if SOURCE_DATE_EPOCH is defined in the environment 
variables
+# otherwise SDE = current time stamp
+AX_BUILD_DATE_EPOCH([SDE], [%Y-%m-%d-%H:%M], [SDE=unknown])
+AC_SUBST([SDE])
+
 dnl configure checks required for Jim files (these are obsolete w/ C99)
 AC_C_CONST
 AC_TYPE_LONG_LONG_INT
diff --git a/src/Makefile.am b/src/Makefile.am
index 4d1c1a2509..b92779e2aa 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -34,7 +34,7 @@ if RELEASE
 else
 %C%_libopenocd_la_CPPFLAGS += -DRELSTR=\"`$(top_srcdir)/guess-rev.sh 
$(top_srcdir)`\"
 %C%_libopenocd_la_CPPFLAGS += -DGITVERSION=\"`cd $(top_srcdir) && git 
describe`\"
-%C%_libopenocd_la_CPPFLAGS += -DPKGBLDDATE=\"`date +%F-%R`\"
+%C%_libopenocd_la_CPPFLAGS += -DPKGBLDDATE=\"$(SDE)\"
 endif
 
 # add default CPPFLAGS

-- 

Reply via email to