谁能解释一下 gcc 交叉编译器的命名约定?
我试图了解 gcc 交叉编译器背后的命名约定,但似乎存在相互矛盾的答案。我的系统中有以下三个交叉编译器:
- arm-none-linux-gnueabi(适用于linux的CodeSourcery ARM编译器)
- arm-none-eabi(适用于裸机系统的CodeSourcery ARM编译器)
- arm-eabi(Android ARM编译器)
当阅读 GNU libtool 手册,它指定交叉编译器命名约定为:
cpu-vendor-os (os = system / kernel-system)
这对于我系统中的编译器来说似乎并不完全准确。 GNU 手册中的信息是否过时,或者编译器发行商只是停止遵循它?
I have tried to understand the naming conventions behind the gcc cross-compilers, but there seems to be conflicting answers. I have the following three cross-compilers in my system:
- arm-none-linux-gnueabi (CodeSourcery ARM compiler for linux)
- arm-none-eabi (CodeSourcery ARM compiler for bare-metal systems)
- arm-eabi (Android ARM compiler)
When reading through the GNU libtool manual, it specifies the cross-compiler naming convention as:
cpu-vendor-os (os = system / kernel-system)
This does not seem completely accurate with the compilers in my system. Is the information in the GNU manual old, or have the compiler distributors simply stopped following it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
命名归结为:
arch-vendor-(os-)abi
例如:
x86_64-w64-mingw32
= x86_64 架构 (=AMD64), w64 (= mingw-w64 作为“供应商”),mingw32(= GCC 看到的 win32 API)i686-pc-msys
= 32 位(pc=通用名称)msys 二进制文件i686-unknown- linux-gnu
= 32 位 GNU/linux您的示例具体为:
arm-none-linux-gnueabi
= ARM 架构、无供应商、linux 操作系统和 gnueabi ABI。arm-eabi
就像你说的那样,用于 Android 本机应用程序。需要注意的是:Debian 使用不同的命名,只是为了增加难度,所以如果您使用的是基于 Debian 的系统,请务必小心,因为它们具有不同的名称,例如:
i686-pc-mingw32
。The naming comes down to this:
arch-vendor-(os-)abi
So for example:
x86_64-w64-mingw32
= x86_64 architecture (=AMD64), w64 (=mingw-w64 as "vendor"), mingw32 (=win32 API as seen by GCC)i686-pc-msys
= 32-bit (pc=generic name) msys binaryi686-unknown-linux-gnu
= 32-bit GNU/linuxAnd your example specifically:
arm-none-linux-gnueabi
= ARM architecture, no vendor, linux OS, and the gnueabi ABI.The
arm-eabi
is alike you say, used for Android native apps.One caveat: Debian uses a different naming, just to be difficult, so be careful if you're on a Debian-based system, as they have different names for eg.
i686-pc-mingw32
.事实是,有一条规则,就是上面 rubenvb 中描述的规则。但在某些情况下,您会发现命名不正确,例如:
上面的这个命令是两个不遵守规则的示例。
The fact is that, there is a rule, and it is the one described above from rubenvb. But in several cases the naming you will find is incorrect, as:
This maming above are 2 examples that are not respecting the rule.