summaryrefslogtreecommitdiff
path: root/chip/g/build.mk
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2019-02-06 15:37:44 -0800
committerchrome-bot <chrome-bot@chromium.org>2019-02-10 21:46:24 -0800
commite8a5c23c859fe613dfad6166cbcf8fd79a237ec6 (patch)
treeeece02daca2b0d20b95b5713f1e66f75d6283aa9 /chip/g/build.mk
parenta012cf8d31667b213f6bd49dd4447b5a3061be79 (diff)
downloadchrome-ec-e8a5c23c859fe613dfad6166cbcf8fd79a237ec6.tar.gz
cr50: use list of object files instead of the libraries for cryptoc
In preparation to enabling link time optimizations for Cr50, modify build system to link cryptoc tree's modules directly instead of linking the archive. CQ-DEPEND=CL:1457210 BRANCH=cr50, cr50-mp BUG=b:65253310 TEST=make buildall -j succeeds, TCG tests succeed. Change-Id: I3ffc27e8ef56a45dad8dd96aa90acace710474a1 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1457600 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'chip/g/build.mk')
-rw-r--r--chip/g/build.mk14
1 files changed, 8 insertions, 6 deletions
diff --git a/chip/g/build.mk b/chip/g/build.mk
index bfefa0e401..d0ff756ac5 100644
--- a/chip/g/build.mk
+++ b/chip/g/build.mk
@@ -218,15 +218,17 @@ $(out)/RW/ec.RW_B.flat: $(out)/RW/ec.RW.flat
$(out)/RW/ec.RW.flat $(out)/RW/ec.RW_B.flat: SIGNER_EXTRAS = $(RW_SIGNER_EXTRAS)
ifeq ($(CONFIG_DCRYPTO),y)
-$(out)/RW/ec.RW.elf $(out)/RW/ec.RW_B.elf: LDFLAGS_EXTRA += -L$(out)/cryptoc \
- -lcryptoc
-$(out)/RW/ec.RW.elf $(out)/RW/ec.RW_B.elf: $(out)/cryptoc/libcryptoc.a
+
+CRYPTOC_OBJS = $(shell find $(out)/cryptoc -name '*.o')
+$(out)/RW/ec.RW.elf $(out)/RW/ec.RW_B.elf: LDFLAGS_EXTRA += $(CRYPTOC_OBJS)
+$(out)/RW/ec.RW.elf $(out)/RW/ec.RW_B.elf: cryptoc_objs
+
# Force the external build each time, so it can look for changed sources.
-.PHONY: $(out)/cryptoc/libcryptoc.a
-$(out)/cryptoc/libcryptoc.a:
+.PHONY: cryptoc_objs
+cryptoc_objs:
$(MAKE) obj=$(realpath $(out))/cryptoc SUPPORT_UNALIGNED=1 \
- CONFIG_UPTO_SHA512=$(CONFIG_UPTO_SHA512) -C $(CRYPTOCLIB)
+ CONFIG_UPTO_SHA512=$(CONFIG_UPTO_SHA512) -C $(CRYPTOCLIB) objs
endif # end CONFIG_DCRYPTO
endif # CHIP_MK_INCLUDED_ONCE is nonempty