From 05612223ba9bfb08e47b374fc4a81b1e65e5f35e Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 24 Jun 2022 12:04:25 -0700 Subject: Makefile: Add option to compile with the C standard library Add the USE_BUILTIN_STDLIB variable, which defaults to 1 and will use the EC standard library implementation (the "builtin" directory). When USE_BUILTIN_STDLIB is set to 0, the toolchain's C standard library will be used instead. BRANCH=none BUG=b:234181908 TEST=./util/compare_build.sh -b all -j 120 => MATCH Signed-off-by: Tom Hughes Change-Id: I63285569205b9c560655dfead6a260c270a92494 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3712035 Reviewed-by: Eric Yilun Lin --- third_party/rules.mk | 2 ++ 1 file changed, 2 insertions(+) (limited to 'third_party') diff --git a/third_party/rules.mk b/third_party/rules.mk index 16fd1e52e3..c729aa24ef 100644 --- a/third_party/rules.mk +++ b/third_party/rules.mk @@ -23,8 +23,10 @@ cmd_libcryptoc = $(MAKE) -C $(CRYPTOC_DIR) \ cmd_libcryptoc_clean = $(cmd_libcryptoc) -q && echo clean ifneq ($(BOARD),host) +ifeq ($(USE_BUILTIN_STDLIB), 1) CPPFLAGS += -I$(abspath ./builtin) endif +endif CPPFLAGS += -I$(CRYPTOC_DIR)/include CRYPTOC_LDFLAGS := -L$(out)/cryptoc -lcryptoc -- cgit v1.2.1