Add TARGET_GCC_VERSION
Default to 4.6, but can overwritten to something else in prebuilts/gcc/$os/$arch/$arch-linux-android*-$ver Change-Id: I16f99d642b8ff8e831d392261a0c536041107051
This commit is contained in:
@@ -43,7 +43,7 @@ include $(TARGET_ARCH_SPECIFIC_MAKEFILE)
|
|||||||
|
|
||||||
# You can set TARGET_TOOLS_PREFIX to get gcc from somewhere else
|
# You can set TARGET_TOOLS_PREFIX to get gcc from somewhere else
|
||||||
ifeq ($(strip $(TARGET_TOOLS_PREFIX)),)
|
ifeq ($(strip $(TARGET_TOOLS_PREFIX)),)
|
||||||
TARGET_TOOLCHAIN_ROOT := prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androideabi-4.6
|
TARGET_TOOLCHAIN_ROOT := prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androideabi-$(TARGET_GCC_VERSION)
|
||||||
TARGET_TOOLS_PREFIX := $(TARGET_TOOLCHAIN_ROOT)/bin/arm-linux-androideabi-
|
TARGET_TOOLS_PREFIX := $(TARGET_TOOLCHAIN_ROOT)/bin/arm-linux-androideabi-
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -114,11 +114,11 @@ TARGET_GLOBAL_CFLAGS += \
|
|||||||
-include $(android_config_h) \
|
-include $(android_config_h) \
|
||||||
-I $(arch_include_dir)
|
-I $(arch_include_dir)
|
||||||
|
|
||||||
# This warning causes dalvik not to build with gcc 4.6.x and -Werror.
|
# This warning causes dalvik not to build with gcc 4.6+ and -Werror.
|
||||||
# We cannot turn it off blindly since the option is not available
|
# We cannot turn it off blindly since the option is not available
|
||||||
# in gcc-4.4.x. We also want to disable sincos optimization globally
|
# in gcc-4.4.x. We also want to disable sincos optimization globally
|
||||||
# by turning off the builtin sin function.
|
# by turning off the builtin sin function.
|
||||||
ifneq ($(filter 4.6 4.6.%, $(shell $(TARGET_CC) --version)),)
|
ifneq ($(filter 4.6 4.6.% 4.7 4.7.%, $(shell $(TARGET_CC) --version)),)
|
||||||
TARGET_GLOBAL_CFLAGS += -Wno-unused-but-set-variable -fno-builtin-sin \
|
TARGET_GLOBAL_CFLAGS += -Wno-unused-but-set-variable -fno-builtin-sin \
|
||||||
-fno-strict-volatile-bitfields
|
-fno-strict-volatile-bitfields
|
||||||
endif
|
endif
|
||||||
|
@@ -43,7 +43,7 @@ include $(TARGET_ARCH_SPECIFIC_MAKEFILE)
|
|||||||
|
|
||||||
# You can set TARGET_TOOLS_PREFIX to get gcc from somewhere else
|
# You can set TARGET_TOOLS_PREFIX to get gcc from somewhere else
|
||||||
ifeq ($(strip $(TARGET_TOOLS_PREFIX)),)
|
ifeq ($(strip $(TARGET_TOOLS_PREFIX)),)
|
||||||
TARGET_TOOLCHAIN_ROOT := prebuilts/gcc/$(HOST_PREBUILT_TAG)/mips/mipsel-linux-android-4.6
|
TARGET_TOOLCHAIN_ROOT := prebuilts/gcc/$(HOST_PREBUILT_TAG)/mips/mipsel-linux-android-$(TARGET_GCC_VERSION)
|
||||||
TARGET_TOOLS_PREFIX := $(TARGET_TOOLCHAIN_ROOT)/bin/mipsel-linux-android-
|
TARGET_TOOLS_PREFIX := $(TARGET_TOOLCHAIN_ROOT)/bin/mipsel-linux-android-
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -93,10 +93,10 @@ TARGET_GLOBAL_CFLAGS += \
|
|||||||
-include $(android_config_h) \
|
-include $(android_config_h) \
|
||||||
-I $(arch_include_dir)
|
-I $(arch_include_dir)
|
||||||
|
|
||||||
# This warning causes dalvik not to build with gcc 4.6.x and -Werror.
|
# This warning causes dalvik not to build with gcc 4.6+ and -Werror.
|
||||||
# We cannot turn it off blindly since the option is not available
|
# We cannot turn it off blindly since the option is not available
|
||||||
# in gcc-4.4.x.
|
# in gcc-4.4.x.
|
||||||
ifneq ($(filter 4.6 4.6.%, $(shell $(TARGET_CC) --version)),)
|
ifneq ($(filter 4.6 4.6.% 4.7 4.7.%, $(shell $(TARGET_CC) --version)),)
|
||||||
TARGET_GLOBAL_CFLAGS += -Wno-unused-but-set-variable \
|
TARGET_GLOBAL_CFLAGS += -Wno-unused-but-set-variable \
|
||||||
-fno-strict-volatile-bitfields
|
-fno-strict-volatile-bitfields
|
||||||
endif
|
endif
|
||||||
|
@@ -36,7 +36,7 @@ include $(TARGET_ARCH_SPECIFIC_MAKEFILE)
|
|||||||
|
|
||||||
# You can set TARGET_TOOLS_PREFIX to get gcc from somewhere else
|
# You can set TARGET_TOOLS_PREFIX to get gcc from somewhere else
|
||||||
ifeq ($(strip $(TARGET_TOOLS_PREFIX)),)
|
ifeq ($(strip $(TARGET_TOOLS_PREFIX)),)
|
||||||
TARGET_TOOLCHAIN_ROOT := prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-linux-android-4.6
|
TARGET_TOOLCHAIN_ROOT := prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-linux-android-$(TARGET_GCC_VERSION)
|
||||||
TARGET_TOOLS_PREFIX := $(TARGET_TOOLCHAIN_ROOT)/bin/i686-linux-android-
|
TARGET_TOOLS_PREFIX := $(TARGET_TOOLCHAIN_ROOT)/bin/i686-linux-android-
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@@ -225,6 +225,11 @@ ifeq ($(TARGET_CPU_ABI),)
|
|||||||
endif
|
endif
|
||||||
TARGET_CPU_ABI2 := $(strip $(TARGET_CPU_ABI2))
|
TARGET_CPU_ABI2 := $(strip $(TARGET_CPU_ABI2))
|
||||||
|
|
||||||
|
# default target GCC version
|
||||||
|
ifeq ($(strip $(TARGET_GCC_VERSION)),)
|
||||||
|
TARGET_GCC_VERSION := 4.6
|
||||||
|
endif
|
||||||
|
|
||||||
# $(1): os/arch
|
# $(1): os/arch
|
||||||
define select-android-config-h
|
define select-android-config-h
|
||||||
system/core/include/arch/$(1)/AndroidConfig.h
|
system/core/include/arch/$(1)/AndroidConfig.h
|
||||||
|
@@ -11,23 +11,23 @@ endif
|
|||||||
|
|
||||||
# Add the ARM toolchain bin dir if it actually exists
|
# Add the ARM toolchain bin dir if it actually exists
|
||||||
ifeq ($(TARGET_ARCH),arm)
|
ifeq ($(TARGET_ARCH),arm)
|
||||||
ifneq ($(wildcard $(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androideabi-4.6/bin),)
|
ifneq ($(wildcard $(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androideabi-$(TARGET_GCC_VERSION)/bin),)
|
||||||
# this should be copied to HOST_OUT_EXECUTABLES instead
|
# this should be copied to HOST_OUT_EXECUTABLES instead
|
||||||
ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androideabi-4.6/bin
|
ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androideabi-$(TARGET_GCC_VERSION)/bin
|
||||||
endif
|
endif
|
||||||
else ifeq ($(TARGET_ARCH),x86)
|
else ifeq ($(TARGET_ARCH),x86)
|
||||||
|
|
||||||
# Add the x86 toolchain bin dir if it actually exists
|
# Add the x86 toolchain bin dir if it actually exists
|
||||||
ifneq ($(wildcard $(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-linux-android-4.6/bin),)
|
ifneq ($(wildcard $(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-linux-android-$(TARGET_GCC_VERSION)/bin),)
|
||||||
# this should be copied to HOST_OUT_EXECUTABLES instead
|
# this should be copied to HOST_OUT_EXECUTABLES instead
|
||||||
ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-linux-android-4.6/bin
|
ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-linux-android-$(TARGET_GCC_VERSION)/bin
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Add the mips toolchain bin dir if it actually exists
|
# Add the mips toolchain bin dir if it actually exists
|
||||||
ifneq ($(wildcard $(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/mips/mipsel-linux-android-4.6/bin),)
|
ifneq ($(wildcard $(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/mips/mipsel-linux-android-$(TARGET_GCC_VERSION)/bin),)
|
||||||
# this should be copied to HOST_OUT_EXECUTABLES instead
|
# this should be copied to HOST_OUT_EXECUTABLES instead
|
||||||
ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/mips/mipsel-linux-android-4.6/bin
|
ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/mips/mipsel-linux-android-$(TARGET_GCC_VERSION)/bin
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ANDROID_BUILD_PATHS := $(ABP)
|
ANDROID_BUILD_PATHS := $(ABP)
|
||||||
|
Reference in New Issue
Block a user