From 1526670628fc1a44cbe553253bdcd23f078c13be Mon Sep 17 00:00:00 2001 From: Ben Cheng Date: Mon, 10 Dec 2012 16:04:39 -0800 Subject: [PATCH] Export TARGET_GCC_VERSION as an env variable. Have it referenced by the adbs tool to pick the specified toolchain. Change-Id: I23df88946254a55d0749d6753e54559faf33e121 --- envsetup.sh | 1 + tools/adbs | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/envsetup.sh b/envsetup.sh index 1b70d109f..a88d8ceec 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -118,6 +118,7 @@ function setpaths() # defined in core/config.mk targetgccversion=$(get_build_var TARGET_GCC_VERSION) + export TARGET_GCC_VERSION=$targetgccversion # The gcc toolchain does not exists for windows/cygwin. In this case, do not reference it. export ANDROID_EABI_TOOLCHAIN= diff --git a/tools/adbs b/tools/adbs index 598af85df..37c520ca8 100755 --- a/tools/adbs +++ b/tools/adbs @@ -140,13 +140,15 @@ def SetupToolsPath(): uname = "darwin-x86" elif uname == "Linux": uname = "linux-x86" - prefix = "./prebuilts/gcc/" + uname + "/arm/arm-linux-androideabi-4.6/bin/" + gcc_version = os.environ["TARGET_GCC_VERSION"] + prefix = "./prebuilts/gcc/" + uname + "/arm/arm-linux-androideabi-" + \ + gcc_version + "/bin/" addr2line_cmd = prefix + "arm-linux-androideabi-addr2line" if (not os.path.exists(addr2line_cmd)): try: prefix = os.environ['ANDROID_BUILD_TOP'] + "/prebuilts/gcc/" + \ - uname + "/arm/arm-linux-androideabi-4.6/bin/" + uname + "/arm/arm-linux-androideabi-" + gcc_version + "/bin/" except: prefix = "";