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
2 files changed