am bf031a25: am 17c679d0: Merge "[ARM] Extend the usage of TARGET_GCC_VERSION for gdb and arm-eabi-*."

* commit 'bf031a2586daccf2a47a66c7cc80ac050ba1c16a':
  [ARM] Extend the usage of TARGET_GCC_VERSION for gdb and arm-eabi-*.
This commit is contained in:
Ben Cheng 2012-11-16 16:25:51 -08:00 committed by Android Git Automerger
commit 2a43d74fb4
2 changed files with 9 additions and 2 deletions

View file

@ -15,6 +15,10 @@ ifeq ($(TARGET_ARCH),arm)
# this should be copied to HOST_OUT_EXECUTABLES instead
ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androideabi-$(TARGET_GCC_VERSION)/bin
endif
ifneq ($(wildcard $(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-eabi-$(TARGET_GCC_VERSION)/bin),)
# this should be copied to HOST_OUT_EXECUTABLES instead
ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-eabi-$(TARGET_GCC_VERSION)/bin
endif
else ifeq ($(TARGET_ARCH),x86)
# Add the x86 toolchain bin dir if it actually exists

View file

@ -116,13 +116,16 @@ function setpaths()
prebuiltdir=$(getprebuilt)
gccprebuiltdir=$(get_abs_build_var ANDROID_GCC_PREBUILTS)
# defined in core/config.mk
targetgccversion=$(get_build_var TARGET_GCC_VERSION)
# The gcc toolchain does not exists for windows/cygwin. In this case, do not reference it.
export ANDROID_EABI_TOOLCHAIN=
local ARCH=$(get_build_var TARGET_ARCH)
case $ARCH in
x86) toolchaindir=x86/i686-linux-android-4.6/bin
;;
arm) toolchaindir=arm/arm-linux-androideabi-4.6/bin
arm) toolchaindir=arm/arm-linux-androideabi-$targetgccversion/bin
;;
mips) toolchaindir=mips/mipsel-linux-android-4.6/bin
;;
@ -138,7 +141,7 @@ function setpaths()
unset ARM_EABI_TOOLCHAIN ARM_EABI_TOOLCHAIN_PATH
case $ARCH in
arm)
toolchaindir=arm/arm-eabi-4.6/bin
toolchaindir=arm/arm-eabi-$targetgccversion/bin
if [ -d "$gccprebuiltdir/$toolchaindir" ]; then
export ARM_EABI_TOOLCHAIN="$gccprebuiltdir/$toolchaindir"
ARM_EABI_TOOLCHAIN_PATH=":$gccprebuiltdir/$toolchaindir"