Fix GCC bug PR 46639, for kernel security

The kernel security team asked us to fix this bug
This CL does that.

Note: This CL depends on

Test: Ran for all toolchain versions; used resulting
compilers to build bullhead, angler and fugu plaform images.

Change-Id: I1e1abf594cff56c6ed6dc228a1d084da18c11420
53 files changed
tree: 63f7c3583b755ddfe5fd77bfa5f448db385fa4e5
  2. README.version
  5. compiler_wrapper
  6. gcc-4.8.3/
  7. gcc-4.9/

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