是否存在正在使用的所有已知目标三元组的列表? [英] Does a list of all known target triplets in use exist?

查看:26
本文介绍了是否存在正在使用的所有已知目标三元组的列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当交叉编译工具时,您通常必须提供目标三元组".给出的例子

When cross compiling tools, you will often have to provide "a target triplet". Example given

  • i686-pc-linux-gnu
  • arm-none-linux-gnueabi
  • powerpc-unknown-linux

等等...

这些三元组有时实际上是四个组成部分,具有以下形式:

These triplets, which are sometimes in fact four components, have the following form:

-[-]-

内核是可选的,制造商可以是未知"或无"之类的东西,因为它通常不相关.

Kernel is optional and manufacturer can be something like "unknown" or "none", since it is often not relevant.

我还没有找到一个页面,其中记录了此处要使用的所有可能值.我知道所有组件几乎都是自由风格",因此没有官方标准会强制您使用官方标准化列表中的组件.然而,工具设计者和配置脚本编写者希望用户将这些三元组指定到他们的工具/脚本中,因此他们必须牢记一些可能的值,并且应该有类似非官方列表"工具制造者、脚本编写者和用户可以使用的东西参考.

What I haven't found yet is a page that documents all possible values to be used here. I know that all components are pretty much "free style", so there is no official standard that would force you to use components from an official standardized list. Yet tool designers and configure script writers expect users to specify those triplets to their tools/scripts, so they must have some possible values in mind and there ought to be something like an "unofficial list" tool makers, script writers and users can use as a reference.

有没有人找到过这样的列表?

Has anyone ever found such a list?

推荐答案

是的,libtool 源中有.它被称为平台.应该是不完整的.还有一个名为 config.sub 的文件,它在运行 autoreconf 时生成.这些可能是最新的/完整的.

Yes, there is in the libtool sources. It's called PLATFORMS. It's probably not complete. There's also a file called config.sub that gets generated when autoreconf is run. Those are probably more up to date/complete.

但根据定义,您所要求的似乎是不可能的.如果某个制造商推出了新的xyz"CPU,它暂时不会出现在列表中.

But by definition, what you are asking for seems kind of impossible. If there's a new 'xyz' CPU that some manufacturer rolls out it's not going to appear on the list for a time.

那么在这种情况下,configure 脚本编写者会做什么?我的解决方案如下.我在一个名为 bootstrap.sh 的脚本中调用了 autoreconf,它在构建之前设置了一些东西,正如 山羊书 伙计们.该脚本使用 sed(技术上是 GNU shtool 中的 sed 包装脚本)来插入什么在 autoreconf 将它复制到 AC_CONFIG_AUX_DIR 之后,我需要进入 config.sub.

So what's a configure script writer do in that case? My solution is the following. I have autoreconf called in a script called bootstrap.sh that sets up a few things before the build as advocated by the Goat Book folks. This script uses sed (well, technically the sed wrapper script in GNU shtool) to insert what I need into config.sub after autoreconf copies it to AC_CONFIG_AUX_DIR.

幸运的是,config.sub 文件带有时间戳,因此如果/何时将xyz"添加到官方"列表中,您只需测试时间戳即可.然后你将新的官方"config.sub 添加到你的 tarball 并使用 bootstrap.sh 来测试 autoreconf 是否正在编写一个最近的足够的config.sub.如果它不够新,请将旧的与新的一起复制.

Fortunately, config.sub files are timestamped so if/when 'xyz' is added to the "official" list you can just test the timestamp. Then you'll add the new "official" config.sub to your tarball and use bootstrap.sh to test if autoreconf is writing a recent enough config.sub. If it's not a recent enough, copy over the old one with the new one.

这篇关于是否存在正在使用的所有已知目标三元组的列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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