任何人都可以解释gcc交叉编译器的命名约定吗? [英] Can anyone explain the gcc cross-compiler naming convention?

查看:207
本文介绍了任何人都可以解释gcc交叉编译器的命名约定吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图理解gcc交叉编译器背后的命名约定,但似乎存在相互矛盾的答案。我的系统中有以下三个交叉编译器:
$ b


  • 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手册中的信息是旧的,还是让编译器经销商停下来之后? 解决方案

命名归结为这个:

arch-vendor-(os-)abi



例如:
$ b $ x86_64-w64-mingw32 = x86_64体系结构(= AMD64),w64( = mingw-w64作为vendor),mingw32(= GCC看到的win32 API)
$ b

i686-pc-msys = 32位(pc =通用名称)msys binary

i686-unknown-linux-gnu = 32位GNU / linux



你的例子具体如下:
$ b $ p $ arm- none-linux-gnueabi = ARM架构,无供应商,linux操作系统和gnueabi ABI。


arm-eabi 就像你说的,用于Android本地应用程序。



一个警告:Debian使用不同的命名方式,这很难,所以如果您使用的是基于Debian的系统,请小心,因为它们对于例如。 i686-pc-mingw32


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?

解决方案

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 binary

i686-unknown-linux-gnu = 32-bit GNU/linux

And 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.

这篇关于任何人都可以解释gcc交叉编译器的命名约定吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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