Define _Unwind_GetIP() for ARM.

Conflicts:
	lib/Headers/unwind.h
Enable ARM EHABI exception handling table for Android.

Conflicts:
	lib/Driver/Tools.cpp
Use memalign for Android.

Android Bionic does not have posix_memalign(), thus
we have to use memalign() instead.  Otherwise, the
code which includes <mmintrin.h> or <mm_malloc.h> can't
be linked.
Remove redundant -lgcc for linker.

Conflicts:
	lib/Driver/Tools.cpp
Add a flag to disable C++ missing return semantics.

Conflicts:
	include/clang/Driver/Options.td
Add -fno-global-ctor-const-promotion option.

The global variable optimization pass of LLVM will try to
evalutate the global variables with static constructors, and
promote the global constants.  Although this optimization is
correct, it may cause some incompatability between gcc in
some incorrect code, which uses const_cast to cast the
constant to mutable.  If you are compiling the legacy code,
then you can try to add -fno-global-ctor-const-promotion
to your CXXFLAGS.

Change-Id: I96657c3ae0f06ef6302f295237bb5781691fbfaa

Conflicts:
	include/clang/Driver/Options.td
Enable PIC for Android even if "-static" is specified.

[WORK IN PROGRESS] XXX Missing test cases.

Android only supports a limited subset of the relocation
types on ARM and MIPS architecture.  Without this fix,
the Android build system can't link the executable properly.
Use i686 as Android target CPU instead of core2 for gcc compatibility.
Use arm1022e so that __ARM_ARCH_5TE__ can be defined.
Use different PIC defaults for Android.
Enable stackrealign for Android x86 by default.
Pass -KPIC for Android MIPS by default.
Do not add additional --sysroot for MIPS

For Android, no need to add sysroot again for mips here because
sysroot is either explicitly specified or implicitly auto-detected
earlier in Driver::BuildCompilation.  Multiple sysroot may also
fail ld.mcld.

Change-Id: If881a49eb5f2ad3bb06d2a10c7b8435f6d561c65
Add new option -Qignore-c-std-not-allowed-with-cplusplus

To suppress option like -std=gnu99 defined in LOCAL_CFLAGS but get
passed for C++ compilation by both Android and NDK build system.
Since -std=gnu99 is C and not for C++, clang may error with message
reads (while g++ gives warning):

  error: invalid argument '-std=gnu99' not allowed with 'C++/ObjC++'

This flag is useful for "clang -fsyntax-only" to accept options originally
work for g++

Change-Id: I25bf360c7b127c03006684b18a321b6a65977fa3

Conflicts:
	include/clang/Driver/Options.td