summaryrefslogtreecommitdiff
path: root/Makefile.rules
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2019-12-20 10:47:35 -0700
committerCommit Bot <commit-bot@chromium.org>2020-01-13 21:19:33 +0000
commitb40d0ebfe31a1ed5503f6ae834dbac5a06487f22 (patch)
tree5b7f87bd3a340e8bddf8751c2f45e5ae55bbaacb /Makefile.rules
parent8e7d2cfac6cc60599c22fe4f072d5744b772fdf5 (diff)
downloadchrome-ec-b40d0ebfe31a1ed5503f6ae834dbac5a06487f22.tar.gz
get_version.sh: add an option for non-changing version file
I've made a hack similar to this a few times when I needed to test that applying commit(s) did not change a certain ec.bin file. get_version.sh already had a REPRODUCIBLE_BUILD option, which is useful for testing that compiling under a different user/host would not change the build, but did not allow testing compiling under a different commit. This adds another option, STATIC_VERSION, which allows different user, host, and commit/repository state. Usage: make BOARD=foo STATIC_VERSION=1 BUG=none BRANCH=none TEST=compile at different commits, observe ec.bin file does not change. Change-Id: I5fc277791cb272317fac2471f763b40290118e1d Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1997735 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile.rules b/Makefile.rules
index 2bfcf88957..7106091fe5 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -52,6 +52,11 @@ quiet = $(cmd_$(1))
endif
endif
+# Provide an option to use a consistent ec_version.h file when
+# compiling, which is useful to verify that a commit does not modify
+# the resulting ec.bin
+export STATIC_VERSION
+
# commands to build all targets
cmd_libec = $(LD) -r $^ -o $@.1.o ${silent_err} && \
$(OBJCOPY) --localize-hidden $@.1.o $@.2.o ${silent_err} && \