diff options
Diffstat (limited to 'core/combo/HOST_linux-x86.mk')
-rw-r--r-- | core/combo/HOST_linux-x86.mk | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/core/combo/HOST_linux-x86.mk b/core/combo/HOST_linux-x86.mk index 5ae4972..6cee6ea 100644 --- a/core/combo/HOST_linux-x86.mk +++ b/core/combo/HOST_linux-x86.mk @@ -33,26 +33,32 @@ endef # LOCAL_CC and LOCAL_CXX to override this. # ifeq ($(TARGET_PRODUCT),sdk) -HOST_SDK_TOOLCHAIN_PREFIX := prebuilt/linux-x86/toolchain/i686-linux-glibc2.7-4.4.3/bin/i686-linux +HOST_SDK_TOOLCHAIN_PREFIX := prebuilts/tools/gcc-sdk # Don't do anything if the toolchain is not there -ifneq (,$(strip $(wildcard $(HOST_SDK_TOOLCHAIN_PREFIX)-gcc))) -HOST_CC := $(HOST_SDK_TOOLCHAIN_PREFIX)-gcc -HOST_CXX := $(HOST_SDK_TOOLCHAIN_PREFIX)-g++ -HOST_AR := $(HOST_SDK_TOOLCHAIN_PREFIX)-ar -endif # $(HOST_SDK_TOOLCHAIN_PREFIX)-gcc exists +ifneq (,$(strip $(wildcard $(HOST_SDK_TOOLCHAIN_PREFIX)/gcc))) +HOST_CC := $(HOST_SDK_TOOLCHAIN_PREFIX)/gcc +HOST_CXX := $(HOST_SDK_TOOLCHAIN_PREFIX)/g++ +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 += \ -include $(call select-android-config-h,linux-x86) # Disable new longjmp in glibc 2.11 and later. See bug 2967937. -HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0 +HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 HOST_NO_UNDEFINED_LDFLAGS := -Wl,--no-undefined |