BUILD_HOST_64bit=1 to build host tools in 64-bit

By default we build tool in 32-bit.  This flag allow individual tool and its
dependencies to be built in 64-bit (eg. Emulator).  Fixes to resolve 64-bit
porting issues (in other git) will be submitted seperately.

Change-Id: I486cf7ddac727d3c374ed890857d497c3a69e598
This commit is contained in:
Andrew Hsieh 2012-02-27 21:03:30 -08:00
parent 3111751dd1
commit ed6b815505
3 changed files with 25 additions and 7 deletions

View File

@ -17,11 +17,17 @@
# Configuration for Darwin (Mac OS X) on x86.
# Included by combo/select.mk
# We build everything in 32-bit, because some host tools are
# 32-bit-only anyway (emulator, acc), and because it gives us
ifneq ($(strip $(BUILD_HOST_64bit)),)
# By default we build everything in 32-bit, because it gives us
# more consistency between the host tools and the target.
# BUILD_HOST_64bit=1 overrides it for tool like emulator
# which can benefit from 64-bit host arch.
HOST_GLOBAL_CFLAGS += -m64
HOST_GLOBAL_LDFLAGS += -m64
else
HOST_GLOBAL_CFLAGS += -m32
HOST_GLOBAL_LDFLAGS += -m32
endif # BUILD_HOST_64bit
# Use the Mac OSX SDK 10.5 if the build host is 10.6
build_mac_version := $(shell sw_vers -productVersion)

View File

@ -42,11 +42,17 @@ HOST_AR := $(HOST_SDK_TOOLCHAIN_PREFIX)-ar
endif # $(HOST_SDK_TOOLCHAIN_PREFIX)-gcc exists
endif # TARGET_PRODUCT == sdk
# We build everything in 32-bit, because some host tools are
# 32-bit-only anyway (emulator, acc), and because it gives us
ifneq ($(strip $(BUILD_HOST_64bit)),)
# By default we build everything in 32-bit, because it gives us
# more consistency between the host tools and the target.
# BUILD_HOST_64bit=1 overrides it for tool like emulator
# which can benefit from 64-bit host arch.
HOST_GLOBAL_CFLAGS += -m64
HOST_GLOBAL_LDFLAGS += -m64
else
HOST_GLOBAL_CFLAGS += -m32
HOST_GLOBAL_LDFLAGS += -m32
endif # BUILD_HOST_64bit
HOST_GLOBAL_CFLAGS += -fPIC
HOST_GLOBAL_CFLAGS += \

View File

@ -26,13 +26,19 @@ TOOLS_EXE_SUFFIX := .exe
ifneq ($(findstring Linux,$(UNAME)),)
ifneq ($(strip $(USE_MINGW)),)
HOST_ACP_UNAVAILABLE := true
TOOLS_PREFIX := /usr/bin/i586-mingw32msvc-
TOOLS_EXE_SUFFIX :=
HOST_GLOBAL_CFLAGS += -DUSE_MINGW
ifneq ($(strip $(BUILD_HOST_64bit)),)
TOOLS_PREFIX := /usr/bin/amd64-mingw32msvc-
HOST_C_INCLUDES += /usr/lib/gcc/amd64-mingw32msvc/4.4.2/include
HOST_GLOBAL_LD_DIRS += -L/usr/amd64-mingw32msvc/lib
else
TOOLS_PREFIX := /usr/bin/i586-mingw32msvc-
HOST_C_INCLUDES += /usr/lib/gcc/i586-mingw32msvc/3.4.4/include
HOST_GLOBAL_LD_DIRS += -L/usr/i586-mingw32msvc/lib
endif
endif
endif # BUILD_HOST_64bit
endif # USE_MINGW
endif # Linux
HOST_CC := $(TOOLS_PREFIX)gcc$(TOOLS_EXE_SUFFIX)
HOST_CXX := $(TOOLS_PREFIX)g++$(TOOLS_EXE_SUFFIX)