summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorTom Hughes <tomhughes@chromium.org>2022-09-13 13:41:47 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-09-16 15:51:20 +0000
commitf9e3ebc75dfcae47bdc7a6e28affb34d00166783 (patch)
tree710e7cbe10926dae4ff35f1135ad6e5194aced7e /core
parent92adcc327f606e3e2eb55b4b5869121f1f34f038 (diff)
downloadchrome-ec-f9e3ebc75dfcae47bdc7a6e28affb34d00166783.tar.gz
Makefile: Set prefixed toolchain for host
When building with portage, the build fails if we use the "unprefixed" compiler (e.g., "g++"). Explicitly use the prefixed compiler when building for the host. BRANCH=none BUG=b:246424843 TEST=emerge-hatch chromeos-ec Force-Relevant-Builds: all Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I50d2b437374bf6857b19151edb5eaea24a7330c3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3894407 Reviewed-by: Eric Yilun Lin <yllin@google.com>
Diffstat (limited to 'core')
-rw-r--r--core/host/toolchain.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/host/toolchain.mk b/core/host/toolchain.mk
new file mode 100644
index 0000000000..168d0e24c2
--- /dev/null
+++ b/core/host/toolchain.mk
@@ -0,0 +1,9 @@
+# Copyright 2022 The ChromiumOS Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+CROSS_COMPILE_HOST_DEFAULT:=x86_64-pc-linux-gnu-
+
+$(call set-option,CROSS_COMPILE,\
+ $(CROSS_COMPILE_host),\
+ $(CROSS_COMPILE_HOST_DEFAULT))