From 1a67ac2ad6a6c0eedaa672f7856e38fb5abf1ede Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Tue, 27 Jun 2017 15:26:58 +0200 Subject: Allow core code to request its cross compiler Instead of having to pass in both the board and the arch used there (which might be complicated in the light of different ECs with different arches), allow passing in the board and a set of cross compilers. The core/*/build.mk then pick the compiler that is responsible for them. The current method works just the same: If you've already set CROSS_COMPILE, no override happens. If you set neither CROSS_COMPILE nor CROSS_COMPILE_$arch, the same default as before this CL is set. BUG=none BRANCH=none TEST=emerge-{samus,kevin} chromeos-ec behave reasonably with adapted ebuild Change-Id: Icf1866f296412dd92ecfe134394224c49f7c3df5 Signed-off-by: Patrick Georgi Reviewed-on: https://chromium-review.googlesource.com/549344 Commit-Ready: Patrick Georgi Tested-by: Patrick Georgi Reviewed-by: Stefan Reinauer --- core/cortex-m0/build.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/cortex-m0/build.mk') diff --git a/core/cortex-m0/build.mk b/core/cortex-m0/build.mk index f8f33aa2a3..6a0f44b367 100644 --- a/core/cortex-m0/build.mk +++ b/core/cortex-m0/build.mk @@ -7,7 +7,7 @@ # # Select ARMv6-m compatible bare-metal toolchain -CROSS_COMPILE?=arm-none-eabi- +$(call set-option,CROSS_COMPILE,$(CROSS_COMPILE_arm),arm-none-eabi-) # CPU specific compilation flags CFLAGS_CPU+=-mthumb -Os -mno-sched-prolog -- cgit v1.2.1