Merge "Export TARGET_GCC_VERSION as an env variable."

This commit is contained in:
Ben Cheng
2012-12-10 16:37:33 -08:00
committed by Gerrit Code Review
2 changed files with 5 additions and 2 deletions

View File

@@ -118,6 +118,7 @@ function setpaths()
# defined in core/config.mk # defined in core/config.mk
targetgccversion=$(get_build_var TARGET_GCC_VERSION) 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. # The gcc toolchain does not exists for windows/cygwin. In this case, do not reference it.
export ANDROID_EABI_TOOLCHAIN= export ANDROID_EABI_TOOLCHAIN=

View File

@@ -140,13 +140,15 @@ def SetupToolsPath():
uname = "darwin-x86" uname = "darwin-x86"
elif uname == "Linux": elif uname == "Linux":
uname = "linux-x86" 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" addr2line_cmd = prefix + "arm-linux-androideabi-addr2line"
if (not os.path.exists(addr2line_cmd)): if (not os.path.exists(addr2line_cmd)):
try: try:
prefix = os.environ['ANDROID_BUILD_TOP'] + "/prebuilts/gcc/" + \ 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: except:
prefix = ""; prefix = "";