summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2021-03-09 03:31:07 +0100
committerPatrick Georgi <pgeorgi@google.com>2021-04-09 06:09:43 +0000
commitcbe2ed48e2d25878bcbd11d37af19fd7a0e6b982 (patch)
tree67f329024a8b486fb0467ad63bfb80f608f5d0ff
parentcf68f34fc2099b9966953163bfe5f891bca46f25 (diff)
Makefile: set and export SOURCE_DATE_EPOCH
Set SOURCE_DATE_EPOCH [1] to allow payload builds and tools to use this as arbitrary timestamp to allow reprocucible builds. [1] https://reproducible-builds.org/docs/source-date-epoch/ Change-Id: I2c870023d13ff4c95305c8aba1459c1fcaf18773 Signed-off-by: Alexander Couzens <lynxis@fe80.eu> Reviewed-on: https://review.coreboot.org/c/coreboot/+/51364 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index e307e1da75..1388977704 100644
--- a/Makefile
+++ b/Makefile
@@ -24,9 +24,10 @@ COREBOOT_EXPORTS += top src srck obj objutil objk
LANG:=C
LC_ALL:=C
TZ:=UTC0
+SOURCE_DATE_EPOCH := $(shell $(top)/util/genbuild_h/genbuild_h.sh . | sed -n 's/^.define COREBOOT_BUILD_EPOCH\>.*"\(.*\)".*/\1/p')
# don't use COREBOOT_EXPORTS to ensure build steps outside the coreboot build system
# are reproducible
-export LANG LC_ALL TZ
+export LANG LC_ALL TZ SOURCE_DATE_EPOCH
DOTCONFIG ?= $(top)/.config
KCONFIG_CONFIG = $(DOTCONFIG)