有没有办法让Android的NDK建造使用gcc的新版本? [英] Is there a way to let Android NDK-build use a newer version of gcc?

查看:443
本文介绍了有没有办法让Android的NDK建造使用gcc的新版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装的Andr​​oid NDK R5B Windows版本,我用Cygwin来编译C code。

我看到NDK建造实际上是调用 C:\android-ndk-r5b\toolchains\arm-linux-androideabi-4.4.3\$p$pbuilt\windows\bin\arm-linux-androideabi-gcc-4.4.3编译。我不知道是否有一种方法可以让NDK建造使用gcc的新版本?

我想这样做的原因是:

  

Gcc4.4.3具有已知的bug就产生不是最佳的组装code对于某些NEON内在
  <一href="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

新发布的GCC 4.6声称,它有一定的改进ARM和内部函数。所以我想尝试有NDK建造使用GCC4.6。

解决方案

我相信你的问题会被这个NDK的文件来回答:<一href="http://android.git.kernel.org/?p=platform/ndk.git;a=blob;f=docs/STANDALONE-TOOLCHAIN.html;h=1b14056f6561808fe7169ad85f826664bf2a38ee;hb=refs/heads/master"相对=nofollow>文档/ STANDALONE-TOOLCHAIN​​.html 。这听起来像你对我知道你在做什么,所以只是听从警告和快乐的黑客。我相信,第3条调用编译器(最简单的方式)就是你要寻找的。

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?

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.

这篇关于有没有办法让Android的NDK建造使用gcc的新版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆