diff options
author | Patrick Georgi <pgeorgi@google.com> | 2017-06-27 15:26:58 +0200 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-07-19 05:01:02 -0700 |
commit | 1a67ac2ad6a6c0eedaa672f7856e38fb5abf1ede (patch) | |
tree | 1668e251f28b4820e89f7e96c5de68740932e232 /core | |
parent | ef73893a4b73e9181382530dd98dd28b1de52c38 (diff) | |
download | chrome-ec-1a67ac2ad6a6c0eedaa672f7856e38fb5abf1ede.tar.gz |
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 <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/549344
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/cortex-m/build.mk | 2 | ||||
-rw-r--r-- | core/cortex-m0/build.mk | 2 | ||||
-rw-r--r-- | core/minute-ia/build.mk | 2 | ||||
-rw-r--r-- | core/nds32/build.mk | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/core/cortex-m/build.mk b/core/cortex-m/build.mk index 5724a9ba39..cc323a2dca 100644 --- a/core/cortex-m/build.mk +++ b/core/cortex-m/build.mk @@ -7,7 +7,7 @@ # # Select ARMv7-m bare-metal toolchain -CROSS_COMPILE?=arm-none-eabi- +$(call set-option,CROSS_COMPILE,$(CROSS_COMPILE_arm),arm-none-eabi-) # FPU compilation flags CFLAGS_FPU-$(CONFIG_FPU)=-mfpu=fpv4-sp-d16 -mfloat-abi=hard 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 diff --git a/core/minute-ia/build.mk b/core/minute-ia/build.mk index c58f5fff4e..4fae1ac107 100644 --- a/core/minute-ia/build.mk +++ b/core/minute-ia/build.mk @@ -7,7 +7,7 @@ # # Select Minute-IA bare-metal toolchain -CROSS_COMPILE=i686-pc-linux-gnu- +$(call set-option,CROSS_COMPILE,$(CROSS_COMPILE_i386),i686-pc-linux-gnu-) # FPU compilation flags CFLAGS_FPU-$(CONFIG_FPU)= diff --git a/core/nds32/build.mk b/core/nds32/build.mk index 68dd1585ab..5b87d85b15 100644 --- a/core/nds32/build.mk +++ b/core/nds32/build.mk @@ -7,7 +7,7 @@ # # Select Andes bare-metal toolchain -CROSS_COMPILE?=nds32le-cros-elf- +$(call set-option,CROSS_COMPILE,$(CROSS_COMPILE_nds32),nds32le-cros-elf-) # CPU specific compilation flags CFLAGS_CPU+=-march=v3m -Os |