From 054ffd2e7c3da585ab223518569e7436858ba5e0 Mon Sep 17 00:00:00 2001 From: Ben Cheng Date: Tue, 11 Dec 2012 14:01:10 -0800 Subject: [PATCH] Define TARGET_GCC_VERSION in target specific make files. So that GCC refresh can be performed in a target specific way. Change-Id: I867e8b8fd671bef8c5af300e657a6da4fface032 --- core/combo/TARGET_linux-arm.mk | 4 ++++ core/combo/TARGET_linux-mips.mk | 4 ++++ core/combo/TARGET_linux-x86.mk | 4 ++++ core/config.mk | 5 ----- envsetup.sh | 4 ++-- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk index dd7a8f0859..8be89c4d51 100644 --- a/core/combo/TARGET_linux-arm.mk +++ b/core/combo/TARGET_linux-arm.mk @@ -34,6 +34,10 @@ ifeq ($(strip $(TARGET_ARCH_VARIANT)),) TARGET_ARCH_VARIANT := armv5te endif +ifeq ($(strip $(TARGET_GCC_VERSION)),) +TARGET_GCC_VERSION := 4.6 +endif + 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)) diff --git a/core/combo/TARGET_linux-mips.mk b/core/combo/TARGET_linux-mips.mk index 6e9cd01d4d..dc28018689 100644 --- a/core/combo/TARGET_linux-mips.mk +++ b/core/combo/TARGET_linux-mips.mk @@ -34,6 +34,10 @@ ifeq ($(strip $(TARGET_ARCH_VARIANT)),) TARGET_ARCH_VARIANT := mips32r2-fp endif +ifeq ($(strip $(TARGET_GCC_VERSION)),) +TARGET_GCC_VERSION := 4.6 +endif + 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)) diff --git a/core/combo/TARGET_linux-x86.mk b/core/combo/TARGET_linux-x86.mk index 948ee17d8f..187e2c2de4 100644 --- a/core/combo/TARGET_linux-x86.mk +++ b/core/combo/TARGET_linux-x86.mk @@ -22,6 +22,10 @@ ifeq ($(strip $(TARGET_ARCH_VARIANT)),) TARGET_ARCH_VARIANT := x86 endif +ifeq ($(strip $(TARGET_GCC_VERSION)),) +TARGET_GCC_VERSION := 4.6 +endif + # 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 diff --git a/core/config.mk b/core/config.mk index 1af5a2a47b..747d8edcb9 100644 --- a/core/config.mk +++ b/core/config.mk @@ -225,11 +225,6 @@ ifeq ($(TARGET_CPU_ABI),) endif 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 define select-android-config-h build/core/combo/include/arch/$(1)/AndroidConfig.h diff --git a/envsetup.sh b/envsetup.sh index a88d8ceec9..2d9d245bd7 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -124,11 +124,11 @@ function setpaths() export ANDROID_EABI_TOOLCHAIN= local ARCH=$(get_build_var TARGET_ARCH) case $ARCH in - x86) toolchaindir=x86/i686-linux-android-4.6/bin + x86) toolchaindir=x86/i686-linux-android-$targetgccversion/bin ;; arm) toolchaindir=arm/arm-linux-androideabi-$targetgccversion/bin ;; - mips) toolchaindir=mips/mipsel-linux-android-4.6/bin + mips) toolchaindir=mips/mipsel-linux-android-$targetgccversion/bin ;; *) echo "Can't find toolchain for unknown architecture: $ARCH"