summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanh-arm <dan.handley@arm.com>2016-02-11 13:25:31 +0000
committerdanh-arm <dan.handley@arm.com>2016-02-11 13:25:31 +0000
commit846f236752a8b7a50d0007b1504cee0f26466339 (patch)
treedc2c465f7cbd5365c417afaececd9452a0017c6d
parent85320724af73d0015d2cb0e99d59c292290b6ce5 (diff)
parent2f5d4a485efd9d9577e6cd2eba5d730a94105b95 (diff)
Merge pull request #513 from pgeorgi/configurable-timestamp
build system: allow overriding the build's timestamp
-rw-r--r--make_helpers/build_macros.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/make_helpers/build_macros.mk b/make_helpers/build_macros.mk
index d6a4e3ab..b22eaf90 100644
--- a/make_helpers/build_macros.mk
+++ b/make_helpers/build_macros.mk
@@ -290,6 +290,10 @@ define MAKE_TOOL_ARGS
$(if $(3),$(eval $(call FIP_ADD_PAYLOAD,$(2),--$(3),bl$(1))))
endef
+# Allow overriding the timestamp, for example for reproducible builds, or to
+# synchronize timestamps across multiple projects.
+# This must be set to a C string (including quotes where applicable).
+BUILD_MESSAGE_TIMESTAMP ?= __TIME__", "__DATE__
# MAKE_BL macro defines the targets and options to build each BL image.
# Arguments:
@@ -315,7 +319,7 @@ $(BUILD_DIR):
$(ELF): $(OBJS) $(LINKERFILE)
@echo " LD $$@"
- @echo 'const char build_message[] = "Built : "__TIME__", "__DATE__; \
+ @echo 'const char build_message[] = "Built : "$(BUILD_MESSAGE_TIMESTAMP); \
const char version_string[] = "${VERSION_STRING}";' | \
$$(CC) $$(CFLAGS) -xc - -o $(BUILD_DIR)/build_message.o
$$(Q)$$(LD) -o $$@ $$(LDFLAGS) -Map=$(MAPFILE) --script $(LINKERFILE) \