Clone this repo:
  1. dca601e update-prebuilts: use fetch_artifact for downloading prebuilts. by Rahul Chaudhry · 4 months ago master
  2. 08875d9 update-prebuilts: do not update mips prebuilts. by Rahul Chaudhry · 4 months ago
  3. cde5cc9 Merge "Remove -Bsymbolic from the Android link spec." by Treehugger Robot · 4 months ago
  4. 0c5a656 Disable linker PIE support with copy reloc. by Rahul Chaudhry · 6 months ago ndk-release-r16 ndk-r16 ndk-r16-beta1 ndk-r16-beta2
  5. fe94879 Add an OWNERS file for GCC. by Caroline Tice · 6 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