Update TOOLCHAIN_GIT_DATE & misc fixes

Fixes:
1. Update TOOLCHAIN_GIT_DATE to 2012-06-10
2. More fix in ld --gc-sections (see comment in
   https://android-review.googlesource.com/#/c/36585/)
3. Correct typos, etc

Change-Id: I6534d4345d3c036cdd6fe51863367cc3e5e5634d
Merge "Move MIPS .dynamic to the data segement, so that it is writable. Replace hard-coded 4096 with symbols for correct segment sizes for MIPS."
build-host-gdb.sh: New script

This patch introduces a new script to rebuild the client gdb
host program(s) from sources. Usage is similar to build-host-gcc.sh,
for example, here's how to rebuild three versions of gdb for
6 host/target combinations:

  build/tools/build-host-gdb.sh --toolchain-src-dir=<path> \
          --gdb-version=6.6,7.1.x,7.3.x \
          --systems=linux-x86,linux-x86_64 \

See --help for all options.

Notice that the binaries are placed under:

  prebuilt/$HOST_SYSTEM/gdb-$TARGET_ARCH-$GDB_VERSION/bin/

This is to disconnect the GDB client version from the GCC one.

+ Introduce the new common-build-host-funcs.sh file which
  contains common functions related to building host binaries
  for the NDK. This is a small refactoring of most of the stuff
  that is already in build-host-gcc.sh. All of them using the
  bh_ or BH_ prefix to avoid namespace collision.

  Note that build-host-gcc.sh is not refactored by this patch,
  this will be performed later.

Change-Id: I6c4432bd5b7d327e6a30784f98137b59cbca10be
Merge "Update TOOLCHAIN_GIT_DATE & misc fixes"
Add gcc 4.6 toolchains configuration files

Change-Id: I26eb8ecb0a3be79f0eab433d1592c348d5d44af0
Merge "Add gcc 4.6 toolchains configuration files"
Merge "build-host-gdb.sh: New script"
Add 4.6 to DEFAULT_GCC_VERSION_LIST; Fixed gdbserver compilation/package

Add 4.6 to supported list (4.4.3 is still the default)
Change to compile gdbserver only once per arch (use default toolchain)
Change gdbserver package name

Change-Id: Ic34640d616ffd8ceaec220ee192c589a28c654fa
Merge "Add 4.6 to DEFAULT_GCC_VERSION_LIST; Fixed gdbserver compilation/package"
Merge "Add gdbserver 7.3.x support"
Install GCC via $BUILD_OUT directory

During toolchain construction "--with-sysroot" contains minimal set
of headers and libraries not needed afterward (*1).  Because GCC by
default will search the path and actually find it by accident (*2),
it's better to point that to local directory such as /tmp.

(*1) NDK specifies --sysroot, and Android build explicitly lists
     all dependencies.
(*2) The path may exist but contain stale headers/libs, reside
     at remote server and slow down GCC, or inaccessible which crash
     GCC!

Change-Id: Ieedee2061d99b7209978130b8a95a9f450602d55
Fixed LOCAL_SHORT_COMMANDS to not recompile/relink source/object every time

When LOCAL_SHORT_COMMANDS is set to true, compiler options are emitted to a
response file and read off using the '@file' syntax.  This is to support very
long commmand line w/o running over the limit of shell command buffer.

Obviously target depends on the response file which shall be regenerated
every time to account for potential changes in command line options.
Unfortunately this triggers rebuilding of target as well even when the content
of response file is identical to the last one.

This CL fixes it by emitting options to a temp file, and only update the response
file when contents differ

Change-Id: Ia2be6df7bbc0d0816b60d552f3fde004f42ca748
Merge "Fixed LOCAL_SHORT_COMMANDS to not recompile/relink source/object every time"
Merge "Install GCC via $BUILD_OUT directory"
Allow 7.3.x gdbserver to bind to a Unix-domain socket using '+' prefix

This is port of the following CLs in gdb-6.6

Change-Id: I928388273c550c509f3f9305efc004b89a02da8e
https://android-review.googlesource.com/#/c/14300
https://android-review.googlesource.com/#/c/14455
https://android-review.googlesource.com/#/c/14524
Fix a few minor errors in host build scripts
Merge "Allow 7.3.x gdbserver to bind to a Unix-domain socket using '+' prefix"
Merge "Fix a few minor errors in host build scripts"
Brand crtbegin_static/dynamic.o with .note.ABI-tag section

Brand Android executable with .note.ABI-tag for debugging tools
to act accordingly.  See crtbrand.c for structure detail.  Note
that it also contains API level.

Also correct typo.

Change-Id: Ibbd460f5af62a19aa9948f974af1345b73622059
Merge "Brand crtbegin_static/dynamic.o with .note.ABI-tag section"