简体   繁体   English

Android NDK GCC似乎是铿锵的 - 它应该是这样吗?

[英]Android NDK GCC appears to be clang - is it the way it should be?

A freshly downloaded NDK fails on linking old projects with error: 刚刚下载的NDK在链接旧项目时失败:

/usr/bin/ld: unrecognised emulation mode: armelf_linux_eabi

As it appears, clang hides behind the mask of gcc: 看来,clang隐藏在gcc的面具后面:

/opt/android-ndk-r18b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --version
Android (4751641 based on r328903) clang version 7.0.2 (https://android.googlesource.com/toolchain/clang 003100370607242ddd5815e4a043907ea9004281) (https://android.googlesource.com/toolchain/llvm 1d739ffb0366421d383e04ff80ec2ee591315116) (based on LLVM 7.0.2svn)
Target: arm--linux-android
Thread model: posix
InstalledDir: /opt/android-ndk-r18b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../../../../llvm/prebuilt/linux-x86_64/bin

Is it just a bug in this NDK version or it was made by intent? 它只是这个NDK版本中的一个错误还是故意制作的?

It's as it should be. 应该如此。

GCC was deprecated in r15, and removed in r18. GCC在r15中被弃用,在r18中被删除。 But to ease the transition for developers, wrapper scripts were provided which makes it seem like GCC still exists while actually using Clang. 但是为了简化开发人员的过渡, 提供了包装脚本,这使得GCC在实际使用Clang时仍然存在。

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

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