Is there a way to let Android NDK-build use a newer version of gcc?

I installed Android NDK r5b Windows version, and I use cygwin to compile the C code.

I see the NDK-build is actually calling
C:\android-ndk-r5b\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\arm-linux-androideabi-gcc-4.4.3 to compile. I wonder if there is a way to let NDK-build use a newer version of gcc?

  • Determining image sizes for multiple android screen sizes/densities
  • Cannot resolve symbol NameValuePair
  • How to disable and enable the scrolling on android ScrollView?
  • Does having variations of gestures in gesture library improve recognition?
  • Save a (.txt) file to the Assets Folder in Android?
  • KeyEvent.ACTION_UP fired TWICE for ACTION_MEDIA_BUTTON
  • The reason I want to do this is:

    Gcc4.4.3 has known bug on generating not optimal assembly code for certain NEON intrinsics
    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43118
    http://hilbert-space.de/?p=22

    The newly released GCC 4.6 claims that it has some improvements for ARM and intrinsics. So I want try to have NDK-build use GCC4.6.

  • Android getIntent().getExtras() returns null
  • Android view animation and hardware layers
  • How to convert pcm samples in byte array as floating point numbers in the range -1.0 to 1.0 and back?
  • What is the differences between `export signed` and `unsigned` .apk file?
  • android Theme.Holo.Dialog changing blue lines to orange
  • How to select the first item in a navigation drawer and open a fragment on application start
  • 4 Solutions collect form web for “Is there a way to let Android NDK-build use a newer version of gcc?”

    I believe your question would be answered by this NDK documentation: docs/STANDALONE-TOOLCHAIN.html. It sounds to me like you know what you’re doing, so just heed the warnings and happy hacking. I believe section 3 “Invoking the compiler (the easy way)” is what you’re looking for.

    There is an alternative NDK build: http://www.crystax.net/en/android/ndk/7

    It includes gcc 4.6.3.

    While trying to answer this myself I came across this, which is a step-by-step account of a man who successfully built the toolchain with GCC 4.6: http://glandium.org/blog/?p=2146.

    Android NDK 8b is released, featuring GCC 4.6 as the default toolchain.

    http://developer.android.com/tools/sdk/ndk/index.html

    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.