build: Allow LDFLAGS_FOR_TARGET to be passed to GCC configure script.

This patch is a small hack that allows the value of LDFLAGS_FOR_TARGET
as defined when the build configure script is invoked to be passed
also to the GCC build script.

This is necessary to build the x86 NDK toolchain. Probably not the
cleanest way to do it though, so the compiler team may want something
else for the sources on android.git.kernel.org.

Change-Id: I2b34ad6c28ede29a8b8244dd54ec607369661b5a
Options brought in from core/combo/* for IA

Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Author: Mark D Horn <mark.d.horn@intel.com>
Add support of expat library

It's needed for GDB 7.3 to be able properly communicate with gdbserver
Add Graphite support for gcc >=4.6
Support new dual-linker option.

Let build automatically detect binutils versions and append proper
--enable-gold=xxx options to binutils configuration.
The story is that gcc-4.6 and binutils-2.21 use
--enable-gold=default, our old gcc and binutils use
--enable-gold=both/gold.
With the patch, we pass toolchain configuration --enable-gold=xxx to
gcc, and let build script automatically detect binutils version
number and append proper --enable-gold=xxx to binutils configuration.

Change-Id: Iaf31e3285107b3afb7a2f0a66c58b02a9937e214
Don't override external CFLAGS and LDFLAGS for gdb build
Enable gold (not default) in binutils-2.22
Support Objective-C/Objective-C++
Make gold default linker in 4.6.3 toolchain
Update build scripts

1) support build of gdb-7.3
2) disable libitm for Android toolchain
3) stop building target libsupc++.a for ARM

Change-Id: I01dab62925892e3d804e698b05c52e0be8c382d5
Always build 32bit host library to /lib32.

Change-Id: I73ed7f7e2120d8be761ec5fdbe747db523e1c53c
Disable libitm for GCC 4.7
Support i[3456]86/x86_64-*-linux-android targets

Allow i[3456]86-*-linux-android and x86_64-*-linux-android targets.

Author: "H.J. Lu" <hongjiu.lu@intel.com>
Fixed to allow CFLAGS to accumulate for building host libbfd

In this case CFLAGS was set to "-Wno-error" before building host
libbfd, and it's followed by -Werror to invoke CC.  There are a
few warnings treated as error but -Wno-error suppress them.

Resetting CFLAGS to -m32 breaks the build

Changed it to accumulate CFLAGS rather than resetting CFLAGS

Change-Id: I118a848c27f91407b75beabea10c35883ca16e5a
Set correct GDB_TARGET for i[3456]86-*-linux-android and x86_64-*-linux-android

Unlike gdb-7.3.x where *-linux-android-* is supported,
"/bin/sh gdb/gdb-7.1.x/config.sub" fails with i686-pc-linux-android.
Changing GDB_TARGET to i[3456]86-linux-gnu or x86_64-linux-gnu for
GDB < 7.3.x to compile.

Change-Id: Ibd8e9ee81877203da09066ece234b74a6e61da49
Merge "Set correct GDB_TARGET for i[3456]86-*-linux-android and x86_64-*-linux-android"
Revert setting GDB_TARGET for i[3456]86-*-linux-android and x86_64-*-linux-android

This CL reverts https://android-review.googlesource.com/#/c/36421
in favor of CL https://android-review.googlesource.com/#/c/36453
which patches GDB/config.sub directly to understand linux-android.

Please see comments in the first CL for rationale.

Change-Id: If3ed4f584d12bf2e998deaeb8b87c07250ed7e03
Allow --enable-gold co-exists with --enable-ld=default

Previously --enable-gold meant "enable gold" and "gold is default".
This CL allows ld remains default when gold is enabled.

Change-Id: I6313ca8b410d9937ddfbd4da05fafbfc0e7b7f06
Disable python support for gdb-7.x

Before python is also prebuilt, disable python support in gdb-7.x
for now, otherwise gdb-7.x/configure may pick up whatever python
in host and build gdb with hard-wired dependency to specific version
of python.

See related issue:
  http://code.google.com/p/android/issues/detail?id=36120

Change-Id: I15d1144767343fb717864470f7a57f66fd7ba127
Use normalized GCC_VERSION (4.6.x for example)