Fix --ldflags param passed to gen-toolchain-wrapper.sh

.. in build/tools/prebuilt-common.sh, --ldflags is passed
without the $ in-front of HOST_LDFLAGS so that ends up as
the first parameter the wrapper passes to the real ld.
Misc fixes

1. Fixed to create bin/$TOOLCHAIN_PREFIX-clang[++] in addition to
   bin/clang[++]
2. Fixed to rebuild stlport inside /tmp/ndk-$USER
3. Adjusted gcc local patch after 4.8.1 and mclinker rebase
4. Uncomment "@echo off" in find-win-host.cmd
5. Cleanup compiler-rt subdir
6. Use wine 1.7 for 64-bit testing

standalone toolchain

Change-Id: I7e74c4b67c81b2f7276e466c2899037cd100d73a

Conflicts:
	build/tools/dev-cleanup.sh
	build/tools/make-standalone-toolchain.sh
	build/tools/toolchain-patches/gcc/0006-Disable-libstdc-versioning.patch
	build/tools/toolchain-patches/mclinker/0005-Fixed-darwin-ld.mcld-GNU-m-emulation-fail.patch
	find-win-host.cmd
Build GCC which always enable --eh-frame-hdr

Previously GCC disable --eh-frame-hdr for static executable.
Android needs --eh-frame-hdr at least for X86 and MIPS which use
eh frames.

See
1. example: 23e3137ee2897464b051599b85a09f130d3ad05d
2. patch for 4.8 https://android-review.googlesource.com/#/c/63181
3. backport to 4.6/4.7: https://android-review.googlesource.com/#/c/63182

Change-Id: I07e0d6a6388068c573f873e2cf2f9a687d271b13

Conflicts:
	build/tools/build-host-gcc.sh
Use python libraries that NDK provides instead of host system's.

Change-Id: Ia63ab248b91906c0c3b782faf92569f6e1fd3926
Fix a warning compiling gabi++ with clang

The operator new() doesn't return in regular fashion.
Add __builtin_unreachable() to tell clang otherwise it complains:

  .../ndk/sources/cxx-stl/gabi++/src/new.cc
  .../ndk/sources/cxx-stl/gabi++/src/new.cc:76:1: warning: control may reach
       end of non-void function [-Wreturn-type]

Change-Id: I3179228f89423fc71c81c0eb5686379dd4f95c53
ndk-gdb.py: Handle quoted paths in find_program

The quotes in os.environ['PATH'] need to be removed
otherwise executables are not found.
ndk-gdb.py: Fix ndk_bin_path determination

It wasn't correct on 64bit. This meant that the gnumake
found on those systems tended to be the system one.

Now, sys.executable is used and if that fails, some more
exhaustive checks of platform.platform() and sys.maxsize
are used (in-case the user uses their own Python - note
if this happens, arch differences between that Python and
the NDK could still cause the system make to be used, but
this is a small corner case that will usually work ok ..)
Fixed stlport compilation warning with gcc4.8

under "-W -Wall -Wno-unused-parameter"

Change-Id: I3a1bb9ca752b9c2e0ca239889d87c3d513d989c0
Error when gdb stub fail to build

In windows *-gdb.exe is a wrapper which setup up PATH and PYTHONHOME
to python prebuilt directory before calling into the real *-gdb-orig.exe.

For 32-bit windows, i686-w64-mingw32-gcc is used to compile gdb stub
because the default i586-mingw32msvc doesn't have functions such as
CreateJobObject used in the stub.  Problem is that i686-w64-mingw32-gcc
may not be installed in build system and the build script fails silently,
causing 32-bit *-gdb.exe fail to launch due to missing libpython2.7.dll.

This patch is to issue error when stub can't be generated for
whatever reason.

Change-Id: I6c939728aa7d90eafc60cb5637b598092557b584

Conflicts:
	build/tools/build-gcc.sh
	build/tools/build-host-gdb.sh
abcc - llvm testing driver

Change-Id: I052eed49d5376d08fb1aa161fb2d7f8b0c2f45d2
Use prebuilts assets

Use prebuilts/assets or $NDK_TARGET_SYSROOT built this way:

 # prebuilts/assets
  export NDK=your-AOSP-path/ndk
  cd $NDK ; ./build/tools/dev-cleanup.sh
  ./build/tools/download-toolchain-sources.sh /tmp/ndk-$USER/src
  ./build/tools/build-on-device-toolchain.sh --no-sync --abi=armeabi-v7a \
    --out-dir=$NDK/tests/abcc/prebuilts/assets/armeabi-v7a /tmp/ndk-$USER/src

 # apk
  android update project -p . -s -t android-17
  ../../ndk-build SYSTEM_PREBUILT_PACKAGE=false APP_STL=stlport_static -B APP_ABI=armeabi-v7a
  ant debug -Dasset.dir=prebuilts/assets/armeabi-v7a

 # likewise for armeabi,x86,mips

Change-Id: I166abbd8d1ca08a4e567fcfbfa41262a8d05ddaa
Use --enable-shrink-binary-size to reduce LLVM toolchain size.

This CL depends on:

https://android-review.googlesource.com/#/c/63863/
https://android-review.googlesource.com/#/c/63862/

Change-Id: I70d48fd01175a890d410a9feda932912572d3a0d

Conflicts:
	build/tools/build-device-llvm.sh
Fix wchar_t-size for le32.

Change-Id: I7791e7919b1feb93e59e9e3932597ec0673a723f

Conflicts:
	tests/build/wchar_t-size/jni/test_8bit.c
	tests/build/wchar_t-size/jni/test_8bit_cplusplus.cpp
	tests/build/wchar_t-size/jni/test_8bit_cplusplus_stdc_limit_macros.cpp
Fix on-device toolchain script

1. build-device-llvm.sh use --abis instead of --arch
2. build-device-llvm.sh keeps BUILD_OUT explicitly specified
3. wrap more commands with "run" (better in --verbose)
4. more arch-specific flags

Change-Id: Ia453945215ada4532a24ab11f54ff195898c49ec