More consistent use of 64-bit build variable.

Set up TARGET_IS_64_BIT and HOST_IS_64_BIT early so we don't need 2
mechanisms to judge if it's 64-bit build;
Remove the unnecessary 32-bit host variables.

Change-Id: I08d6d4d9ea70f91135fe2ee05463fb9a0d1cee42
This commit is contained in:
Ying Wang 2014-07-08 17:07:36 -07:00
parent af95db033d
commit 4b1c95d8d2
8 changed files with 13 additions and 27 deletions

View File

@ -17,8 +17,6 @@
# Configuration for Darwin (Mac OS X) on x86_64.
# Included by combo/select.mk
HOST_IS_64_BIT := true
HOST_GLOBAL_CFLAGS += -m64
HOST_GLOBAL_LDFLAGS += -m64

View File

@ -17,8 +17,6 @@
# Configuration for builds hosted on linux-x86_64.
# Included by combo/select.mk
HOST_IS_64_BIT := true
ifeq ($(strip $(HOST_TOOLCHAIN_PREFIX)),)
HOST_TOOLCHAIN_PREFIX := prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/bin/x86_64-linux-
endif

View File

@ -22,8 +22,6 @@
TOOLS_PREFIX := #prebuilt/windows/host/bin/
TOOLS_EXE_SUFFIX := .exe
HOST_IS_64_BIT := true
# Settings to use MinGW has a cross-compiler under Linux
ifneq ($(findstring Linux,$(UNAME)),)
ifneq ($(strip $(USE_MINGW)),)

View File

@ -43,8 +43,6 @@ else
TARGET_GCC_VERSION := $(TARGET_GCC_VERSION_EXP)
endif
TARGET_IS_64_BIT := true
TARGET_ARCH_SPECIFIC_MAKEFILE := $(BUILD_COMBOS)/arch/$(TARGET_ARCH)/$(TARGET_ARCH_VARIANT).mk
ifeq ($(strip $(wildcard $(TARGET_ARCH_SPECIFIC_MAKEFILE))),)
$(error Unknown ARM architecture version: $(TARGET_ARCH_VARIANT))

View File

@ -43,8 +43,6 @@ else
TARGET_GCC_VERSION := $(TARGET_GCC_VERSION_EXP)
endif
TARGET_IS_64_BIT := true
TARGET_ARCH_SPECIFIC_MAKEFILE := $(BUILD_COMBOS)/arch/$(TARGET_ARCH)/$(TARGET_ARCH_VARIANT).mk
ifeq ($(strip $(wildcard $(TARGET_ARCH_SPECIFIC_MAKEFILE))),)
$(error Unknown MIPS architecture variant: $(TARGET_ARCH_VARIANT))

View File

@ -31,8 +31,6 @@ else
TARGET_GCC_VERSION := $(TARGET_GCC_VERSION_EXP)
endif
TARGET_IS_64_BIT := true
# Include the arch-variant-specific configuration file.
# Its role is to define various ARCH_X86_HAVE_XXX feature macros,
# plus initial values for TARGET_GLOBAL_CFLAGS

View File

@ -72,19 +72,13 @@ endif
ifeq (,$(BUILD_HOST_64bit))
# Default to 32-bit-by-default multilib host build.
HOST_PREFER_32_BIT := true
ifeq ($(HOST_PREFER_32_BIT),true)
BUILD_HOST_64bit := true
endif
endif
# HOST_ARCH
ifneq (,$(findstring x86_64,$(UNAME)))
HOST_ARCH := x86_64
HOST_2ND_ARCH := x86
else ifneq (,$(findstring 86,$(UNAME)))
# It's not officially supported!
HOST_ARCH := x86
HOST_2ND_ARCH :=
HOST_IS_64_BIT := true
endif
ifeq ($(HOST_PREFER_32_BIT),true)
@ -170,6 +164,9 @@ board_config_mk :=
TARGET_OS := linux
# TARGET_ARCH should be set by BoardConfig.mk and will be checked later
ifneq ($(filter %64,$(TARGET_ARCH)),)
TARGET_IS_64_BIT := true
endif
# the target build type defaults to release
ifneq ($(TARGET_BUILD_TYPE),debug)
@ -218,11 +215,7 @@ OUT_DOCS := $(TARGET_COMMON_OUT_ROOT)/docs
BUILD_OUT_EXECUTABLES := $(BUILD_OUT)/bin
HOST_OUT_EXECUTABLES := $(HOST_OUT)/bin
ifeq (x86_64,$(HOST_ARCH))
HOST_OUT_SHARED_LIBRARIES := $(HOST_OUT)/lib64
else
HOST_OUT_SHARED_LIBRARIES := $(HOST_OUT)/lib
endif
HOST_OUT_JAVA_LIBRARIES := $(HOST_OUT)/framework
HOST_OUT_SDK_ADDON := $(HOST_OUT)/sdk_addon
@ -258,7 +251,7 @@ TARGET_OUT_COMMON_GEN := $(TARGET_COMMON_OUT_ROOT)/gen
TARGET_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_SYSTEM)
TARGET_OUT_EXECUTABLES := $(TARGET_OUT)/bin
TARGET_OUT_OPTIONAL_EXECUTABLES := $(TARGET_OUT)/xbin
ifneq ($(filter %64,$(TARGET_ARCH)),)
ifeq ($(TARGET_IS_64_BIT),true)
# /system/lib always contains 32-bit libraries,
# and /system/lib64 (if present) always contains 64-bit libraries.
TARGET_OUT_SHARED_LIBRARIES := $(TARGET_OUT)/lib64
@ -292,19 +285,24 @@ TARGET_OUT_DATA_APPS := $(TARGET_OUT_DATA)/app
TARGET_OUT_DATA_KEYLAYOUT := $(TARGET_OUT_KEYLAYOUT)
TARGET_OUT_DATA_KEYCHARS := $(TARGET_OUT_KEYCHARS)
TARGET_OUT_DATA_ETC := $(TARGET_OUT_ETC)
ifeq ($(TARGET_IS_64_BIT),true)
TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest64
else
TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest
endif
TARGET_OUT_DATA_FAKE := $(TARGET_OUT_DATA)/fake_packages
$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_EXECUTABLES := $(TARGET_OUT_DATA_EXECUTABLES)
$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_SHARED_LIBRARIES := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SHARED_LIBRARIES)
$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_APPS := $(TARGET_OUT_DATA_APPS)
$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest
TARGET_OUT_CACHE := $(PRODUCT_OUT)/cache
TARGET_OUT_VENDOR := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_VENDOR)
TARGET_OUT_VENDOR_EXECUTABLES := $(TARGET_OUT_VENDOR)/bin
TARGET_OUT_VENDOR_OPTIONAL_EXECUTABLES := $(TARGET_OUT_VENDOR)/xbin
ifneq ($(filter %64,$(TARGET_ARCH)),)
ifeq ($(TARGET_IS_64_BIT),true)
TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(TARGET_OUT_VENDOR)/lib64
else
TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(TARGET_OUT_VENDOR)/lib

View File

@ -31,5 +31,5 @@ ifdef LOCAL_MODULE_PATH_64
$(error $(LOCAL_PATH): Do not set LOCAL_MODULE_PATH_64 when building test $(LOCAL_MODULE))
endif
LOCAL_MODULE_PATH_32 := $(TARGET_OUT_DATA_NATIVE_TESTS)/$(LOCAL_MODULE)
LOCAL_MODULE_PATH_64 := $(TARGET_OUT_DATA_NATIVE_TESTS)64/$(LOCAL_MODULE)
LOCAL_MODULE_PATH_64 := $(TARGET_OUT_DATA_NATIVE_TESTS)/$(LOCAL_MODULE)
LOCAL_MODULE_PATH_32 := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_NATIVE_TESTS)/$(LOCAL_MODULE)