关于configure中build,target,host中的若干问题 - 91Linux

来源:百度文库 编辑:神马文学网 时间:2024/04/29 03:14:51

高级搜索收藏本站博客写作论坛交流
首页资讯UbuntuFedoraLFSGentooMandrivaSlackwareSuse红旗入门安装分区管理
多媒体命令内核安全SHELL嵌入式C++JAVAPerlPHPPythonRubyDB2MySQLOraclePostgreSQLSybase

智能模糊搜索 仅搜索标题
热门关键字:ubuntu分区linux系统进程grub函数
当前位置 :主页>Linux教程>编程开发>列表
关于configure中build,target,host中的若干问题
来源: 作者: 时间:2007-12-21 点击:
今天学习GDB的过程中,发现了了一个configure的问题,就是configure中build,target,host到底代表什么意思.在往上搜索到了这篇文档.
可以参考:http://www.airs.com/ian/configure/configure_toc.html
Reference:
http://www.tcpdump.org/lists/workers/2001/11/msg00148.html
Nope. See `info standards‘ for the definition of $build*, $host* and
$target* macros. Basically, $build* refer to the system compilation is
being performed on, $host* refer to the system compiled binaries are to
run on and $target* refer to the system compiled binaries will handle. As
such $target* usually have a meaning a meaning for developemt tool only.
So far packages that make use of $target* I know of are binutils, gcc,
gdb and ksymoops (a Linux run-time error disassembler). Let‘s take
binutils as an example. I compile it in several ways, following are
examples of configure invocations:
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了.不知道我的解释是否正确,如果大家看到了这篇帖子,觉得不对,批评指正.
[收藏] [推荐] [评论] [打印] [关闭]
0
顶一下
上一篇:移植uClinux-2.6.9到S3C44B0的过程
下一篇:AT91sam9263EK使用JFFS2根文件系统
最新评论共有 0 位网友发表了评论
查看所有评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名?注册

热点关注
C/C++笔试题目大全ELF文件格式简介Linux下Qt编程入门教程中java读取文本文件的代码如何生成csv文件,以及csvGCC起步---linux下编译C程QT 入门几种Linux嵌入式开发环境Linux内核模块编程入门Linux系统进程控制编程(五种常见的 PHP 设计模式Tomcat6.0、JDK1.6.0环境重新编译Linux操作系统的嵌入式Linux系统的GDB远程c语言中命令行参数argc,ar什么是CSV文件的通俗解答c/c++实现一个密集型serveC++面试题集(最全的C\C++java读写xml文件实例make命令参数详解
相关文章
c和java的udp互通linux 下分析源代码工具php配置选项详解JSP与JavaBean-JSP基础JDK对IA64(Montecito)支初学Linux和并行编程遇到PHP程序设计中的坏味道linux C 调试linux下的c++(class baseconst char*, char const*
精彩广告
Power by DedeCms Copyright 2004-2007豫ICP备05004162号
91Linux!