关于Linux系统中configure中build,target,host中的若干问题

源码编译
1607
linux
linux 举报
2022-02-16

1. `./configure --build=mipsel-linux --host=mipsel-linux

--target=mipsel-linux' will build native mipsel-linux binutils on

mipsel-linux.

 

2. `./configure --build=i386-linux --host=mipsel-linux

--target=mipsel-linux' will cross-build native mipsel-linux binutils on

i386-linux.

 

3. `./configure --build=i386-linux --host=i386-linux

--target=mipsel-linux' will build mipsel-linux cross-binutils on

i386-linux.

 

4. `./configure --build=mipsel-linux --host=i386-linux

--target=mipsel-linux' will cross-build mipsel-linux cross-binutils for

i386-linux on mipsel-linux.

As you see, only if $build != $host a cross-compilation is performed.

 

   具体解释一下,build就是你正在使用的机器,host就是你编译好的程序可以运行的平台,target就是你编译的程序可以处理的平台.这个build和host比较好理解,但是target就不好办了,到底什么意思呢?一般来说,我们平时所说的交差编译用不到他target的,比如./configure --build=i386-linux,--host=arm-linux就可以了,在386的平台上编译可以运行在arm板的程序.但是,一般我们都是编译程序,而不是编译工具,如果我们编译工具,比如gcc,这个target就有用了.如果我们需要在一个我们的机器上为arm开发板编译一个可以处理mips程序的gcc,那么target就是mips。

举例来说,比如在使用SW申威处理器的服务器时,如果你需要编译源码,需要先使用uname -a 命令查看服务器的target信息,在获取target信息后,正常编译,但是需要加上 --bulid= target  (target内容为查出的具体信息)

————————————————

版权声明:本文为CSDN博主「一条有梦想的鱼」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。

原文链接:https://blog.csdn.net/a_dreaming_fish/article/details/71195204


倒序看帖 只看楼主
热点关注
VSFTP2.3.4(笑脸漏洞)渗透测试
postfix中recipient/client/sender/helo四者的区别
postfix的相关个别参数设置
extman-1.1自带了图形化显示日志的功能;此功能需要rrdtool的支持,您需要安装此些模块才可能正常显示图形日志。
shell 脚本中常见的 if [ $? -ne 0 ]; 意思
shell 中 if [ “x${var}“ == “x“ ] 中 x的作用
shell脚本每行后面多了一个^M的原因和解决办法
服务停止、启动、重启一体化脚本,万能语言启动脚本
shell参数判断
在后台用进程名运行bash脚本
shell脚本每行后面多了一个^M的原因和解决办法
定时检测服务,检测down掉后重启。系统检测到DMSERVER运行正常
用postfwd取代extmail 的slockd
postfix如何过滤某个域名邮件的发送?
给postfix设置黑名单