Update the build-toolchain.sh script.

This patch modifies the script to be able to build all prebuilt toolchain
binaries in a single call. I.e. if passed a recent toolchain source package
generated with download-toolchain-sources.sh, then it will build both
GCC 4.2.1 and GCC 4.4.0 and place them in the final prebuilt tarball.

We need this because, while we're going to switch to gcc 4.4.0 by default
in a new version of the NDK, the 4.4.0 C++ compiler is more strict about
various constructs and might refuse to build certain sources. An option
will be given to application developers to use 4.2.1 instead, to keep their
sources building.

Other changes include:

Move all builds into a random temporary directory under /tmp by default,
unless you use --build-out=<path>.

Cleanup the build out directory on succesful build

The generated tarball is now named android-ndk-prebuilt-<date>-<host>.tar.bz2
by default, unless you use the new --release=<name> option which will replace
<date> with <name> instead.

Removal of un-needed files (e.g. info or man pages, libiberty static library,
etc..) to reduce the size of the final tarball.
1 file changed