diff options
author | Vadim Sukhomlinov <sukhomlinov@google.com> | 2022-12-01 10:19:47 -0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-12-07 07:12:06 +0000 |
commit | 5e189385955ac30eb55eaa70b1ffbb06ded59b6b (patch) | |
tree | 9150ca7a28b56cb4ba292c30a8d2a7b601d2b297 | |
parent | 18e0e656c68ec28211db479c499aca4f62dbea62 (diff) | |
download | chrome-ec-5e189385955ac30eb55eaa70b1ffbb06ded59b6b.tar.gz |
cr50: set cc-name to gcc to avoid build errors
Some change in ChromeOS chroot caused different defaults, so cc-name
switched from `gcc` to `clang` in compiler autodetection for host
target, but never was set to `gcc` by board/chip/core.
Adding setting `cc-name:=gcc` for core/cortex-m/build.mk to use specific
toolchain.
BUG=b:260904818
TEST=make buildall -j
Change-Id: Ic0b8ffade9fa4d82bd265add8b7906be7d98f7c1
Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4071387
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Auto-Submit: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
Code-Coverage: Vadim Sukhomlinov <sukhomlinov@chromium.org>
(cherry picked from commit 8bda16cb8f98e0fcdb41c82eb98f21c16cad16ec)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4073345
Auto-Submit: Mary Ruthven <mruthven@chromium.org>
Tested-by: Mary Ruthven <mruthven@chromium.org>
Commit-Queue: Mary Ruthven <mruthven@chromium.org>
(cherry picked from commit 6e7cb4b13d9e4ce1649046f286a8e736c3dcac4a)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4083164
-rw-r--r-- | core/cortex-m/build.mk | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/cortex-m/build.mk b/core/cortex-m/build.mk index be2a8a6501..b18d01e114 100644 --- a/core/cortex-m/build.mk +++ b/core/cortex-m/build.mk @@ -10,7 +10,8 @@ $(call set-option,CROSS_COMPILE,\ $(CROSS_COMPILE_arm),\ /opt/coreboot-sdk/bin/arm-eabi-) - +# Force gcc compiler +cc-name:=gcc # FPU compilation flags CFLAGS_FPU-$(CONFIG_FPU)=-mfpu=fpv4-sp-d16 -mfloat-abi=hard @@ -24,8 +25,9 @@ CFLAGS_CPU+=-flto LDFLAGS_EXTRA+=-flto endif -# TODO: remove this workaround once migration to gcc 11.2 completed. -GCC_VERSION := $(shell $(CROSS_COMPILE)gcc -dumpversion) +# gcc 11.2 had a known issue which doesn't affect Cr50 build anymore +# but we can't remove -fno-ipa-modref as it changes FIPS module digest +GCC_VERSION := $(shell $(CROSS_COMPILE)$(cc-name) -dumpversion) ifeq ("$(GCC_VERSION)","11.2.0") # IPA modref pass crashes gcc 11.2 when LTO is used with partial linking CFLAGS_CPU += -fno-ipa-modref |