configure脚本参数

--build

编译主机

--host

在这个主机上运行编译出来的程序。

--target

在这个主机上的程序,可以被host上运行的的工具操作,所以target主要对于gcc工具链和binutils工具集有意义。


比如,我们可以在普通的x86上编译一个x86上运行的gcc工具链,这个gcc工具链用来生成arm上运行的可执行程序。

./configure --build=x86 --host=x86 --target=arm

如果我们已经得到这个arm的gcc工具链了,我们编译一个arm上运行的helloworld。

./configure --build=x86 --host=arm 

这时候,--target就没有意义了,因为helloworld不是一个工具链,不再生成其它目标平台的二进制代码。


If build, host, and target are all the same, this is called a native. 
If build and host are the same but target is different, this is called a cross. 
If build, host, and target are all different this is called a canadian 
(for obscure reasons dealing with Canada's political party and the background of
the person working on the build at that time). If host and target are the same,
but build is different, you are using a cross-compiler to build a native for a 
different system. Some people call this a host-x-host, crossed native, or 
cross-built native. If build and target are the same, but host is different, 
you are using a cross compiler to build a cross compiler that produces code for
the machine you're building on. This is rare, so there is no common way of 
describing it. There is a proposal to call this a crossback.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值