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-r5btoolchainsarm-linux-androideabi-4.4.3prebuiltwindowsbinarm-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?

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.


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.


在尝试自己回答这个问题时,我遇到了这个问题,这是一个用GCC 4.6成功构建工具链的人的详细说明:http://glandium.org/blog/?p=2146。

链接地址: http://www.djcxy.com/p/23372.html

上一篇: 编译错误:手臂

下一篇: 构建使用更新版本的gcc?