If you download the source code for the complete Android project, you can find the cross-compilation tool, such as the linux-x86 used by Android, In the prebuilt/arm-eabi-4.2.1/toolchain/arm-eabi-gcc-4.2.1/bin directory.
Android does not use glibc as the C library, but uses the Bionic Libc developed by Google. The built-in Toolchain (prebuilt) is based on Bionic Libc rather than glibc. This makes other toolchains more difficult to use for Android.
Most Linux enthusiasts use Toolchain at http://www.codesourcery.com/gnu_toolchains/arm/download.htmlto download a common toolchain.
It is feasible to compile and transplant the Android Linux kernel, because the kernel does not require the C library, but it is troublesome to directly use other toolchains when developing Android applications.
However, only compiled applications can run in Android simulators using static compilation, which is obviously unacceptable in actual development. Currently, we have not seen any documents indicating that other cross compilers have been successfully transplanted to compile Android applications. (???)
Compared with glibc, Bionic Libc has the following features:
[Cpp]
-1 adopts BSD License instead of glibc GPL License;
-2 The size is only about 200 k, which is about half smaller than glibc and faster than glibc;
-3 implements a smaller and faster pthread;
-4 provides important functions required by Android, such as "getprop" and "LOGI;
-5 does not fully support POSIX standards, such as C ++ exceptions and wide chars;
-6 libthread_db and libm are not provided. (???)
In addition, some other binary tools used in Android are also special:
[Cpp]
-1 when loading a dynamic library,/system/bin/linker is used instead of common/lib/ld. so;
-2 The prelink tool is not a commonly used prelink, but a prelink. the source code of the prelink tool is build, tools, and apriori;
-3 strip tool does not use commonly used strip, namely, the arm-eabi-strip under the prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin directory, instead, it is the soslim tool located in out/host/linux-x86/bin.
Solution to underlying problems: Remove Android system coupling
[Cpp]
1. Remove Dalvik from bionic and hardware drivers
2. Modify Dalvik to support standard glibc and GNU/Linux
3. Treat Dalvik as a common application
4 Dalvik can be individually optimized and improved