交叉编译器 [英] cross compilers

查看:92
本文介绍了交叉编译器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我了解什么是交叉编译器以及为什么要使用它们。但是在一次采访中,我被问到交叉编译器在哪些方面不同于普通编译器。我告诉他们交叉编译器的目的。同样,它们的内存映射也会有所不同。但是这个家伙似乎并没有被说服。谁能告诉我与普通编译器的基本区别?

I understand what are cross compilers and why are they used. But in an interview I was asked that in what ways cross compilers are different from the normal compilers. I told them the purpose of the cross compilers. Also, the memory map will be different for them. But the guy does not seems to be convinced. Can any one tell me the basic differences from normal compilers?

推荐答案

普通编译器可以是交叉编译器。以 GCC 为例。

A normal compiler can be a cross compiler. Take GCC for example.

维基百科


GCC是
编译器的免费软件集合,可以设置为跨
编译。它支持许多平台
和语言。但是,由于
志愿者的时间有限以及维护
交叉编译器工作所需的大量
工作,在许多版本中,
的交叉编译器中有
[需要引用]

GCC, a free software collection of compilers, can be set up to cross compile. It supports many platforms and languages. However, due to limited volunteer time and the huge amount of work it takes to maintain working cross compilers, in many releases some of the cross compilers are broken.[citation needed]

GCC要求每个
目标平台都必须有
binutils的编译副本。特别重要的
是GNU汇编器。
因此,首先必须使用发送到配置脚本的开关
--target = some-target正确编译binutils。 GCC还必须为
配置相同的--target
选项。只要
binutils创建的工具在
路径中可用,GCC便可以正常运行

GCC requires that a compiled copy of binutils be available for each targeted platform. Especially important is the GNU Assembler. Therefore, binutils first has to be compiled correctly with the switch --target=some-target sent to the configure script. GCC also has to be configured with the same --target option. GCC can then be run normally provided that the tools, which binutils creates, are available in the path.

这篇关于交叉编译器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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