Clone this repo:
  1. ac6128e Merge "gcc: backport patch to support vrnd<*>_f64 aarch64 intrinsics." by android-build-prod (mdb) · 4 weeks ago master
  2. 71959ce gcc: backport patch to support vrnd<*>_f64 aarch64 intrinsics. by Yunlian Jiang · 4 weeks ago
  3. 5669c99 gcc: backport an upstream patch to make it work with newer glibc. by Yunlian Jiang · 4 weeks ago
  4. e46354e Fix gcc 4.8.3 makeinfo build failure by Ryan Prichard · 3 months ago
  5. 2cdcfd3 [GCC] Fix #endif problem in libgcc/emutls.c by Caroline Tice · 4 months ago

Building GCC for Android

The following process is used to build the GCC that is used by both the Android platfrom and the NDK.

Both Linux and Windows toolchains are built on Linux machines. Windows host binaries are built with mingw. Building binaries for Mac OS X should be built using 10.8 to ensure compatibility with Android's minimum supported hosts.


  • Android GCC Repository

    • Check out the branch gcc

      repo init -u -b gcc
      # Googlers, use
      repo init -u \
          persistent- \
          -b gcc
  • Additional Linux Dependencies (available from apt):

    • texinfo
    • gcc-mingw32
    • bison
    • flex
    • libtool
  • Mac OS X also requires Xcode.

Host/Target prebuilts

For Linux or Darwin:

# Additional options and toolchain names will be show with --help.
$ python --toolchain TOOLCHAIN_NAME

For Windows, from Linux:

$ python --system windows TOOLCHAIN_NAME