Misc fix libc++

This CL contains growing list of misc fixes during the first pass
of fail tests analysis.

Change-Id: I8999ac279f3dc80939c70a4bd563b57462fb5401

Conflicts:
	sources/android/support/include/locale.h
	sources/android/support/include/wchar.h
	sources/android/support/src/locale/newlocale.c
	sources/android/support/src/stdlib_support.c
	sources/android/support/src/wchar_support.c
	sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp
	sources/cxx-stl/llvm-libc++/libcxx/src/new.cpp
	sources/cxx-stl/llvm-libc++/libcxx/src/support/android/locale_android.cpp
	sources/cxx-stl/llvm-libc++/patches.android/0003-src-new.cpp-Support-building-with-GAbi.patch
	sources/cxx-stl/llvm-libc++/patches.android/0004-android-Add-locale-support.patch
Fix [$ABI] in ndk-build

The new ndk-build echo build step prefix with [$TARGET_ARCH_ABI].
Unfortunately by the time it's echoed $TARGET_ARCH_ABI becomes
the last word of NDK_APP_ABI.  For examples,

cd $NDK/samples/bitmap-plasma
../../ndk-build -B  # APP_ABI := armeabi armeabi-v7a

[armeabi-v7a] Gdbserver      : [arm-linux-androideabi-4.6] libs/armeabi/gdbserver
[armeabi-v7a] Gdbsetup       : libs/armeabi/gdb.setup
[armeabi-v7a] Gdbserver      : [arm-linux-androideabi-4.6] libs/armeabi-v7a/gdbserver
[armeabi-v7a] Gdbsetup       : libs/armeabi-v7a/gdb.setup
[armeabi-v7a] Compile thumb  : plasma <= plasma.c
[armeabi-v7a] SharedLibrary  : libplasma.so
[armeabi-v7a] Install        : libplasma.so => libs/armeabi/libplasma.so
[armeabi-v7a] Compile thumb  : plasma <= plasma.c
[armeabi-v7a] SharedLibrary  : libplasma.so
[armeabi-v7a] Install        : libplasma.so => libs/armeabi-v7a/libplasma.so

Fix to record the current ABI at the time when make targets are created

Change-Id: I1a316e982d2f9ccbe4919c474cb70ad41106e5a2

Conflicts:
	build/core/build-binary.mk
Fix a mclinker crash linking libcompiler_rt_static.a by clang

See mclinker upstream 824a0b515c437abe3e5c59d1e143e9552668e710
As local patch because
1) mclinker ToT is moving on to 2.6.0-dev
2) easier to git rebase/push toolchain/mclinker.git next time

Change-Id: I160288a85782b7e0c0ae06ca26f58bc65f4b8db8
Fix gen-platforms.sh build

__dso_handle.h has bene moved to bionic/libc/arch-common/bionic/__dso_handle.h
since eb847bc8666842a3cfc9c06e8458ad1abebebaf0

Change-Id: I03f6491fd44f25e7cd36e54767b26324e95dc80d
Fix unknown arch build failed.

Change-Id: Ia2c5f457043389f5b215cccfb2e3eba10467f176
Remove --disable-threads and its comment when configuring MIPS gcc.
We already enable threads at this commit 3574653b120d5a973f2c2c2a09f77639158c02d3.

Change-Id: If309f6c452289fc11cbaec9a3258e3933370ea31
Filter out aarch64 just like x86_64 for unknown arch.

This fixes rebuild-all-prebuilt.sh building process.

Change-Id: Ia98952ad0d5c93923fb4dfe0626969ecb5bc413a
Revert "Fix unknown arch build failed."

This reverts commit d97c2aef7e3dfda2bf20224ba49b0dedb8d440c6.
The correct fix should be https://android-review.googlesource.com/#/c/67831/
Fix llvm-3.3 mac build; abcc VERBOSE adds llc timer

Change-Id: I7e7d6e461b53012856c4fea213ae8bce7ff248e8
Add -v and -save-temps

Change-Id: I4bb6d41f6ac45880e09e76398bff8deaf7b6a280
Fix /compile_log and removal of libpath

1) Fix to redirect stderr to /compile_log correctly
2) Fix to no deletion of file in the middle of readdir()

Change-Id: I126714070b82d2e7e63b96ff3c95c1d4fda465b9
Add testcase to exercise newly added math functions

Change-Id: I6063d4fb96092b1a644a37a9ea766fa6cac1d7fd
Add testcase to demo how -mhard-float work in armeabi-v7a

Now it's possible to compile all user code in armeab-v7a with "-mhard-float",
and either link Android native APIs with float-abi=softfp, or link
with a customized libm_hard.a which uses float-abi=hard

See comments in tests/device/hard-float/jni/Android.mk for details

Change-Id: I75efcbdcf12c2815b604d468d2a5507de4545feb
Add libm_hard to system lib list

Change-Id: I2873b4da325c7fa1822dc680257e5fcaa7284377

Conflicts:
	build/core/build-binary.mk