简体   繁体   English

有没有办法让Android NDK-build使用更新版本的gcc?

[英]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. 我安装了Android NDK r5b Windows版本,我使用cygwin编译C代码。

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. 我看到NDK-build实际上正在调用C:\\ android-ndk-r5b \\ toolchains \\ arm-linux-androideabi-4.4.3 \\ prebuilt \\ windows \\ bin \\ arm-linux-androideabi-gcc-4.4.3。 I wonder if there is a way to let NDK-build use a newer version of gcc? 我想知道是否有办法让NDK-build使用更新版本的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 Gcc4.4.3已经知道为某些NEON内在函数生成非最佳汇编代码的错误
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43118 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43118
http://hilbert-space.de/?p=22 http://hilbert-space.de/?p=22

The newly released GCC 4.6 claims that it has some improvements for ARM and intrinsics. 新发布的GCC 4.6声称它对ARM和内在函数有一些改进。 So I want try to have NDK-build use GCC4.6. 所以我想尝试让NDK-build使用GCC4.6。

I believe your question would be answered by this NDK documentation: docs/STANDALONE-TOOLCHAIN.html . 我相信您的问题将通过此NDK文档得到解答: 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. 我相信第3节“调用编译器(简单方法)”就是你要找的东西。

There is an alternative NDK build: http://www.crystax.net/en/android/ndk/7 还有另一种NDK构建: http//www.crystax.net/en/android/ndk/7

It includes gcc 4.6.3. 它包括gcc 4.6.3。

在试图自己回答这个问题时,我偶然发现了这个问题,这是一个用GCC 4.6成功构建工具链的人的逐步说明: http//glandium.org/blog/ ?p = 21460

Android NDK 8b is released, featuring GCC 4.6 as the default toolchain. Android NDK 8b发布,以GCC 4.6为默认工具链。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM