summaryrefslogtreecommitdiff
path: root/Makefile.toolchain
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2011-12-08 09:37:32 -0800
committerRandall Spangler <rspangler@chromium.org>2011-12-08 10:55:27 -0800
commitbc4c1b4eb9ca3b30f07ba78d0c3f591e057874b1 (patch)
treee1f9b00a10d6d4d84a82375a51b580550ffd39d4 /Makefile.toolchain
parente24fa592d2a215d8ae67917c1d89e68cdf847a03 (diff)
downloadchrome-ec-bc4c1b4eb9ca3b30f07ba78d0c3f591e057874b1.tar.gz
Separate utility build for build and host utils
Build is the system doing the build (e.g. 64-bit linux) and host is the target platform on top of the ec (e.g. 32-bit Chromium OS). Necessary to get ectool properly compiling for Chromium OS. Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=none TEST=make && file build/bds/util/ectool; ectool should be a 32-bit binary Change-Id: I50eba4c164ece236646a7c6087b1b86769beeb28
Diffstat (limited to 'Makefile.toolchain')
-rw-r--r--Makefile.toolchain7
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile.toolchain b/Makefile.toolchain
index 982e1f9819..d52967edde 100644
--- a/Makefile.toolchain
+++ b/Makefile.toolchain
@@ -1,4 +1,4 @@
-# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
@@ -7,13 +7,15 @@
# Toolchain configuration
CROSS_COMPILE ?= armv7a-cros-linux-gnueabi-
+HOST_CROSS_COMPILE ?= i686-pc-linux-gnu-
CC=$(CROSS_COMPILE)gcc
CPP=$(CROSS_COMPILE)cpp
LD=$(CROSS_COMPILE)ld
OBJCOPY=$(CROSS_COMPILE)objcopy
OBJDUMP=$(CROSS_COMPILE)objdump
-HOSTCC?=gcc
+BUILDCC?=gcc
+HOSTCC?=$(HOST_CROSS_COMPILE)gcc
CFLAGS_WARN=-Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common \
@@ -25,5 +27,6 @@ CFLAGS_INCLUDE=$(foreach i,$(includes),-I$(i) )
CFLAGS_DEFINE=-DOUTDIR=$(out) -DCHIP=$(CHIP) -DTASKFILE=$(PROJECT).tasklist
CPPFLAGS=$(CFLAGS_DEFINE) $(CFLAGS_INCLUDE)
CFLAGS=$(CPPFLAGS) $(CFLAGS_CPU) $(CFLAGS_DEBUG) $(CFLAGS_WARN)
+BUILD_CFLAGS=$(CPPFLAGS) -O3 $(CFLAGS_DEBUG) $(CFLAGS_WARN)
HOST_CFLAGS=$(CPPFLAGS) -O3 $(CFLAGS_DEBUG) $(CFLAGS_WARN)
LDFLAGS=-nostdlib -X