diff --git a/core/dumpvar.mk b/core/dumpvar.mk index 4a44f7716..d481742de 100644 --- a/core/dumpvar.mk +++ b/core/dumpvar.mk @@ -10,15 +10,18 @@ ABP:=$(PWD)/$(HOST_OUT_EXECUTABLES) endif # Add the ARM toolchain bin dir if it actually exists -ifneq ($(wildcard $(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androideabi-4.6/bin),) - # this should be copied to HOST_OUT_EXECUTABLES instead - ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androideabi-4.6/bin -endif +ifeq ($(TARGET_ARCH),arm) + ifneq ($(wildcard $(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androideabi-4.6/bin),) + # this should be copied to HOST_OUT_EXECUTABLES instead + ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androideabi-4.6/bin + endif +else ifeq ($(TARGET_ARCH),x86) # Add the x86 toolchain bin dir if it actually exists -ifneq ($(wildcard $(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-linux-android-4.6/bin),) - # this should be copied to HOST_OUT_EXECUTABLES instead - ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-linux-android-4.6/bin + ifneq ($(wildcard $(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-linux-android-4.6/bin),) + # this should be copied to HOST_OUT_EXECUTABLES instead + ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-linux-android-4.6/bin + endif endif ANDROID_BUILD_PATHS := $(ABP) ANDROID_PREBUILTS := prebuilt/$(HOST_PREBUILT_TAG) diff --git a/envsetup.sh b/envsetup.sh index 84ec3e538..8f311b69f 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -131,25 +131,24 @@ function setpaths() export ANDROID_EABI_TOOLCHAIN=$gccprebuiltdir/$toolchaindir fi - export ARM_EABI_TOOLCHAIN= + unset ARM_EABI_TOOLCHAIN ARM_EABI_TOOLCHAIN_PATH case $ARCH in - x86) toolchaindir=x86/i686-eabi-4.4.3/bin - ;; - arm) toolchaindir=arm/arm-eabi-4.6/bin + arm) + toolchaindir=arm/arm-eabi-4.6/bin + if [ -d "$gccprebuiltdir/$toolchaindir" ]; then + export ARM_EABI_TOOLCHAIN="$gccprebuiltdir/$toolchaindir" + ARM_EABI_TOOLCHAIN_PATH=":$gccprebuiltdir/$toolchaindir" + fi ;; *) - echo "Can't find toolchain for unknown architecture: $ARCH" - toolchaindir=xxxxxxxxx + # No need to set ARM_EABI_TOOLCHAIN for other ARCHs ;; esac - if [ -d "$gccprebuiltdir/$toolchaindir" ]; then - export ARM_EABI_TOOLCHAIN=$gccprebuiltdir/$toolchaindir - fi export ANDROID_TOOLCHAIN=$ANDROID_EABI_TOOLCHAIN export ANDROID_QTOOLS=$T/development/emulator/qtools export ANDROID_DEV_SCRIPTS=$T/development/scripts - export ANDROID_BUILD_PATHS=:$(get_build_var ANDROID_BUILD_PATHS):$ANDROID_QTOOLS:$ANDROID_TOOLCHAIN:$ARM_EABI_TOOLCHAIN$CODE_REVIEWS:$ANDROID_DEV_SCRIPTS + export ANDROID_BUILD_PATHS=:$(get_build_var ANDROID_BUILD_PATHS):$ANDROID_QTOOLS:$ANDROID_TOOLCHAIN$ARM_EABI_TOOLCHAIN_PATH$CODE_REVIEWS:$ANDROID_DEV_SCRIPTS export PATH=$PATH$ANDROID_BUILD_PATHS unset ANDROID_JAVA_TOOLCHAIN