GNU Configure 中的 build target和host 的区别
来源:互联网 发布:python web.input 编辑:程序博客网 时间:2024/04/26 05:27
转【http://wifihack.net/blog/2008/08/gnu-configure-%E4%B8%AD%E7%9A%84-build-target%E5%92%8Chost-%E7%9A%84%E5%8C%BA%E5%88%AB/】
一、 http://en.wikipedia.org/wiki/Cross_compile
The GNU autotools packages (i.e. autoconf, automake, and libtool) use the notion of a build platform, a host platform, and a target platform.
The build platform is where the code is actually compiled.
The host platform is where the compiled code will execute.
The target platform usually only applies to compilers. It represents what type of object code the package itself will produce (such as cross-compiling a cross-compiler); otherwise the target platform setting is irrelevant. For example, consider cross-compiling a video game that will run on a Dreamcast. The machine where the game is compiled is the build platform while the Dreamcast is the host platform.
二、 http://www.airs.com/ian/configure/configure_5.html#SEC30
When building cross compilation tools, there are two different systems involved: the system on which the tools will run, and the system for which the tools generate code.
The system on which the tools will run is called the host system.
The system for which the tools generate code is called the target system.
For example, suppose you have a compiler which runs on a GNU/Linux system and generates ELF programs for a MIPS embedded system. In this case the GNU/Linux system is the host, and the MIPS ELF system is the target. Such a compiler could be called a GNU/Linux cross MIPS ELF compiler, or, equivalently, a ‘i386-linux-gnu’ cross ‘mips-elf’ compiler.
简单说明一下:
- build 就是你现在使用的机器。
- host 就是你编译好的程序能够运行的平台。
- target 编译程序能够处理的平台。一般都用在构建编译本身的时候(gcc), 才用target, 也就是说平时我们所说的交叉编译用不到target.
Target usually have a meaning for developemt tool only.
比如: 在386的平台上编译可以运行在arm板的程序 ./configure –build=i386-linux,–host=arm-linux就可以了.
因为一般我们都是编译程序而不是编译工具.
如果我们编译工具,比如gcc,这个target就有用了.如果我们需要在一个我们的机器上为arm开发板编译一个可以处理 mips程序的gcc,那么target就是mips了.
比如:
1. ./configure --build=mipsel-linux --host=mipsel-linux--target=mipsel-linux' will build native mipsel-linux binutils onmipsel-linux.2. ./configure --build=i386-linux --host=mipsel-linux--target=mipsel-linux' will cross-build native mipsel-linux binutils oni386-linux.3. ./configure --build=i386-linux --host=i386-linux--target=mipsel-linux' will build mipsel-linux cross-binutils oni386-linux.4. ./configure --build=mipsel-linux --host=i386-linux--target=mipsel-linux' will cross-build mipsel-linux cross-binutils fori386-linux on mipsel-linux.As you see, only if $build != $host a cross-compilation is performed.
- 参考:
- http://en.wikipedia.org/wiki/Cross_compile
- http://www.airs.com/ian/configure/configure_5.html#SEC30
- http://oss.lzu.edu.cn/blog/blog.php?/do_showone/tid_116.html
– EOF –
- GNU Configure 中的 build target和host 的区别
- GNU configure中的build/target和host的区别
- configure文件中的build、host、target含义
- 关于configure中的build/host/target
- configure 时的host build target问题
- configure 时的host build target问题
- configure 时的host build target问题
- configure 时的host build target问题
- 也来小结一下configure中的配置参数host和target的含义和区别
- ./configure -build,-host,-target设置
- ./configure -build,-host,-target设置
- ./configure -build,-host,-target设置
- ./configure -build,-host,-target设置
- ./configure -build,-host,-target设置
- ./configure -build,-host,-target设置
- ./configure -build,-host,-target设置
- ./configure -build,-host,-target设置
- 关于configure中build,target,host中的若干问题
- 亲自编译eucalyputs源码包
- 快速排序的两种实现
- 测试管理经验
- Discuz!后台怎么拿到Webshell
- 測試流程之每日构建
- GNU Configure 中的 build target和host 的区别
- 什么是LGPL开源协议
- 亲身体验范例框架AppFuse 2.1到底能为Java Web应用开发带来什么?
- 什么是GPL开源协议
- 什么人適合軟件測試
- 如何成为一个牛逼的C/C++程序员?(转载)
- 学习java应该注意的一些细节(转载)
- 《简单之美》摘录和读后感
- Apache Licence开源协议