diff options
author | wangxianzhu@chromium.org <wangxianzhu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-10 23:14:37 +0000 |
---|---|---|
committer | wangxianzhu@chromium.org <wangxianzhu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-10 23:14:37 +0000 |
commit | 6394facfcd6150a69be418212f1caff2f6639540 (patch) | |
tree | 9a91cb579c78153596f9479ff4cb3e6d0093c9ab /build/android/adb_gdb | |
parent | 99152a7e8091125c7be25c458b7219fa9f6192e1 (diff) | |
download | chromium_src-6394facfcd6150a69be418212f1caff2f6639540.zip chromium_src-6394facfcd6150a69be418212f1caff2f6639540.tar.gz chromium_src-6394facfcd6150a69be418212f1caff2f6639540.tar.bz2 |
Use $ANDROID_TOOLCHAIN set by envsetup.sh in adb_gdb and gdb_apk
After recent upgradation to third_party/android_tools/ndk, there is no
linux-x86 toolchain directory any more, but linux-x86_64 instead. This
causes failure of adb_gdb and gdb_apk which hard-coded linux-x86
in the scripts. As envsetup.sh already set correct $ANDROID_TOOLCHAIN,
now use it in the scripts instead of the hardcoded one.
BUG=none
NOTRY=true (presubmit passed)
Review URL: https://chromiumcodereview.appspot.com/15028013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199567 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/android/adb_gdb')
-rwxr-xr-x | build/android/adb_gdb | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/build/android/adb_gdb b/build/android/adb_gdb index e0b3265..0a536c1 100755 --- a/build/android/adb_gdb +++ b/build/android/adb_gdb @@ -358,19 +358,6 @@ else fi fi -# Detect the NDK system tag, i.e. the name used to identify the host. -# out: NDK system tag (e.g. 'linux-x86_64'). -get_ndk_host_tag () { - if [ -z "$NDK_HOST_TAG" ]; then - case $(uname -s) in - Linux) NDK_HOST_TAG=linux-x86_64;; - Darwin) NDK_HOST_TAG=darwin-x86;; - *) panic "You can't run this script on this system: $uname -a";; - esac - fi - echo "$NDK_HOST_TAG" -} - # Convert an NDK architecture name into a GNU configure triplet. # $1: NDK architecture name (e.g. 'arm') # Out: Android GNU configure triplet (e.g. 'arm-linux-androideabi') @@ -426,43 +413,11 @@ get_ndk_toolchain_prebuilt () { echo "$FILE" } -# Find the path to an NDK's toolchain full prefix for a given architecture -# $1: NDK install path -# $2: NDK architecture name -# Out: install path + binary prefix (e.g. -# ".../path/to/bin/arm-linux-androideabi-") -get_ndk_toolchain_fullprefix () { - local NDK_DIR="$1" - local ARCH="$2" - local TARGET NAME HOST GCC CONFIG - - # NOTE: This will need to be updated if the NDK changes the names or moves - # the location of its prebuilt toolchains. - # - GCC= - HOST=$(get_ndk_host_tag) - CONFIG=$(get_arch_gnu_config $ARCH) - GCC=$(get_ndk_toolchain_prebuilt \ - "$NDK_DIR" "$ARCH" "$HOST/bin/$CONFIG-gcc") - if [ ! -f "$GCC" -a "$ARCH" = "x86" ]; then - # Special case, the x86 toolchain used to be incorrectly - # named i686-android-linux-gcc! - GCC=$(get_ndk_toolchain_prebuilt \ - "$NDK_DIR" "$ARCH" "$HOST/bin/i686-android-linux-gcc") - fi - if [ -z "$GCC" ]; then - panic "Cannot find Android NDK toolchain for '$ARCH' architecture. \ -Please verify your NDK installation!" - fi - echo "${GCC%%gcc}" -} - # $1: NDK install path # $2: target architecture. get_ndk_gdbserver () { local NDK_DIR="$1" local ARCH=$2 - local HOST=$(get_ndk_host_tag) local BINARY # The location has moved after NDK r8 @@ -478,9 +433,6 @@ get_ndk_gdbserver () { # issues when both binaries do not speak the same wire protocol. # if [ -z "$TOOLCHAIN" ]; then - ANDROID_TOOLCHAIN=$(get_ndk_toolchain_fullprefix \ - "$ANDROID_NDK_ROOT" "$TARGET_ARCH") - ANDROID_TOOLCHAIN=$(dirname "$ANDROID_TOOLCHAIN") log "Auto-config: --toolchain=$ANDROID_TOOLCHAIN" else # Be flexible, allow one to specify either the install path or the bin |