From f24c356a968e13d03f80df9840fe0a9b2652f872 Mon Sep 17 00:00:00 2001 From: "Torne (Richard Coles)" Date: Fri, 25 Apr 2014 16:24:22 +0100 Subject: [PATCH] Fix PATH setup for arm64. On architectures other than "arm", the combination of ANDROID_KERNEL_TOOLCHAIN_PATH being empty, and CODE_REVIEWS being empty, leads to adding a :: into the user's PATH, which is highly undesirable. Neither CODE_REVIEWS nor the mips toolchaindir is ever used, so just remove them, and make sure we only include the extra colon when setting the kernel toolchain path to a non-empty value. Change-Id: I2dfa7d3a322b56b6abbc47476082dc6ae4dd6a82 --- envsetup.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/envsetup.sh b/envsetup.sh index 3b9423b67f..f75bf88599 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -115,7 +115,6 @@ function setpaths() fi # and in with the new - CODE_REVIEWS= prebuiltdir=$(getprebuilt) gccprebuiltdir=$(get_abs_build_var ANDROID_GCC_PREBUILTS) @@ -160,12 +159,10 @@ function setpaths() # Legacy toolchain configuration used for ARM kernel compilation toolchaindir=arm/arm-eabi-$targetgccversion/bin if [ -d "$gccprebuiltdir/$toolchaindir" ]; then - ANDROID_KERNEL_TOOLCHAIN_PATH="$gccprebuiltdir/$toolchaindir" - export ARM_EABI_TOOLCHAIN=$ANDROID_KERNEL_TOOLCHAIN_PATH + export ARM_EABI_TOOLCHAIN="$gccprebuiltdir/$toolchaindir" + ANDROID_KERNEL_TOOLCHAIN_PATH="$ARM_EABI_TOOLCHAIN": fi ;; - mips) toolchaindir=mips/mips-eabi-4.4.3/bin - ;; *) # No need to set ARM_EABI_TOOLCHAIN for other ARCHs ;; @@ -173,7 +170,7 @@ function setpaths() export ANDROID_QTOOLS=$T/development/emulator/qtools export ANDROID_DEV_SCRIPTS=$T/development/scripts:$T/prebuilts/devtools/tools - export ANDROID_BUILD_PATHS=$(get_build_var ANDROID_BUILD_PATHS):$ANDROID_QTOOLS:$ANDROID_TOOLCHAIN:$ANDROID_KERNEL_TOOLCHAIN_PATH$CODE_REVIEWS:$ANDROID_DEV_SCRIPTS: + export ANDROID_BUILD_PATHS=$(get_build_var ANDROID_BUILD_PATHS):$ANDROID_QTOOLS:$ANDROID_TOOLCHAIN:$ANDROID_KERNEL_TOOLCHAIN_PATH$ANDROID_DEV_SCRIPTS: export PATH=$ANDROID_BUILD_PATHS$PATH unset ANDROID_JAVA_TOOLCHAIN