Cortex-A15 supports hardware divisions.

According to the Cortex-A15 Technical Reference Manual 4.3.15,
Cortex-A15 supports divide instructions in both Thumb and ARM mode.

Change-Id: I248ea5933c8a92393460a3fcddcc02e0107d3d0a
Fix (MC/ARM-thumb/far jump) bug.

Change-Id: I6b06771eebe2e64c038328901a8f83b1fcefe633

Conflicts:
	include/llvm/MC/MCStreamer.h
Conditional compile fenv.h for NDK headers.

NDK armeabi default use -msoft-float, and it cannot truely use
fenv.h since it has vmrs,vmsr inline asm.

Change-Id: I40b7c8ce2d6e30a3abb3fed50c0bcd06d0a16002
Make an llvm-config for cross-compilation

The llvm-config-host program that was installed wasn't
host-related at all; it runs on build and also reports
about build. This program is still needed for the build
to work, so a new BuildToolsCross folder is created and
in there, an llvm-config is built that runs on build
and reports about host.

For this to work, the Makefile that generates llvm-config
and the one that generates BuildVariables.inc must not be
the same, so Makefile.buildvars is used, and an extra var
CROSS_DEPTH is used to enable BuildToolsCross to step one
folder higher up into the top-level build folder to get
the correct values to be emitted into BuildVariables.inc.

The old BuildTools/*/bin/llvm-config is now installed
as llvm-config-build, and the new one is installed as
llvm-config-host

This change has also been submitted to llvm-commits ML:

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130826/185708.html
Bitcode link tool for le32-none-ndk triple.

Cherry-picked from release_32 branch with modifications.
Patch by Lai Wei-Chih <Robert.Lai@mediatek.com>
Patch by WenHan Gu <Wenhan.gu@mediatek.com>

Changes compared with the original patch:

1. llvm::Linker API changes:
   - Arguments of llvm::Linker() are changed
   - Rename LinkInModule() to linkInModule()
   - releaseModule() has been removed.  Use getModule() instead.
   - Several headers are moved to llvm/IR/*

2. Define the ControlFlags in LinkerConfig.

3. Link with "archive" component.

Conflicts:
	tools/Makefile
Find libraries in search paths.

Also dump LDFlags to <output-filename>.info

Cherry-picked from release_32 branch.
Patch by Lai Wei-Chih <Robert.Lai@mediatek.com>
Script for bitcode to native binaries.

Cherry-picked from release_32 branch.
Patch by Lai Wei-Chih <Robert.Lai@mediatek.com>
Read ldflags from info file.

bc2native script will read *.info generated from le32-none-ndk-link.
And generate the ldflags from it.

Also fix ARMEH test fails:

1. Add default flags for llc arm:

-arm-enable-ehabi
-arm-enable-ehabi-descriptors

2. For ARM, generate assembly first and
   call the assembler to produce relocatables.

Cherry picked from release_32 branch.
Patch by Lai Wei-Chih <Robert.Lai@mediatek.com>

Changes from original patch:

1. -arm-ignore-has-ras is no longer needed.
Replace libgcc with compiler-rt in bc2native script.

Need to complete the missing functions in compiler-rt.

Change-Id: Iafb7de3eb8680c0a92d7b9529c3883d0aab182bf
Change llvm-3.2 to llvm-3.3.

Change-Id: Ib383c3737f702d2841010bee8bcf5b8e5308c9d4
change llvm-3.3 to llvm-3.4
Allow mulitple occurrance of -gc-sections option

Change-Id: Iebaaeaf0af30cfb803df730465f017cf27b6479e
Ignore --eh-frame-hdr for le32-none-ndk-link.

Change-Id: Ib2d3a6f626313388628c9f87d23c86d0375360c2
Import Wrap library for bitcode wrapper.

source:
https://android.googlesource.com/platform/frameworks/compile/libbcc/
commit: 25b7205e16e422469da74f88e74ad79e7c284ac7

libbcc/bcinfo
libbcc/include/bcinfo

Cherry-picked from release_32 branch.
Patch by Lai Wei-Chih <Robert.Lai@mediatek.com>

Conflicts:
	lib/Makefile
Add 4 tags in LLVMWrap.

* kAndroidBitcodeType
  Generate this bitcode for shared object or executable.

* kAndroidSOName
  Store DT_SONAME for this bitcode.

* kAndroidDependLibrary
  Store list of dependent library for this bitcode.

* kAndroidLDFlags
  Store linker flags for this bitcode.

Cherry-picked from release_32 branch.
Patch by Lai Wei-Chih <Robert.Lai@mediatek.com>
Change bitcode wrapper fields.

Encode linker flags for more flexible.
Also not generating .info since it cannot pack into APK.

Change-Id: Ie4dc2a37752aaa93d5f8cacb24c91efe724ceea0
Update toolchain to migrate to LLVM 3.3.

* Change default LLVM_VERSION from 3.2 to 3.3.
* Use integrated-as on ARM target since ARM EHABI is ready since now.
 - Provide --use-gas in command line if you really want GNU as.

Change-Id: I4e94f768073b7422490f97982e7d6e1fbe0a4976
update bc2native to llvm 3.4
Let ndk-bc2native usable by standalone usage.

We can either use --ndk-dir for package release usage, or use --sysroot
for standalone usage. Only one of them can exists at the same time.

Change-Id: Ia972d7903461b11f900a949496632e16f90939d1
Compute correct HOST_TAG in ndk-bc2native.py

Derive HOST_TAG from pwd, otherwise ndk-bc2native.py may fail to
locate lc.mcld when only 64-bit NDK package is installed

Change-Id: I62084999fb07b3f5516818ea3b063168b36ccde5