欢迎访问工聚网上海,祝您购物愉快!
工聚网 http://www.edakit.com , 欢迎选购各类单片机,CPLD/FPGA, DSP, ARM9开发板!促销期间,购物满500,包快递费,电话:021-64605465 手机:13764470518 QQ: 384625935 可到柜台取货:上海北京东路668号科技京城东楼地下一层C126
什么是交叉编译
上一篇 /
下一篇 2008-03-10 14:52:43
/ 个人分类:技术文章
Compiling a program takes place by running a compiler on the build platform. The compiled program will run on the host platform. Usually these two are the same; if they are different, the process is called cross-compilation.
对一个程序进行编译的过程要通过在一个操作系统平台(编译平台)上运行编译器而完成。被编译的程序也将运行在一个操作系统平台(运行平台)上,这二个平台通常是相同的,如果二者不同,则这个编译过程被称为交叉编译。
Typically the hardware architecture differs, like for example when compiling a program destined for the MIPS architecture on an x86 computer; but cross-compilation is also applicable when only the operating system environment differs, as when compiling a FreeBSD program under Linux; or even just the system library, as when compiling programs with uClibc on a glibc host.
一般来说交叉编译被应用在硬件结构不同的机器上,如在x86的计算机上为MIPS体系的机器编译程序。但交叉编译也适用于硬件结构相同而操作系统不同的情况,比如在Linux操作系统下为FreeBSD编译程序。交叉编译甚至也可以应用于只有系统库不同的情况下,如在使用glibc的机器上用uClibc编译程序。
Cross-compilation is typically more involved and prone to errors than with native compilation. Due to this, cross-compiling is normally only utilized if the target is not yet self-hosting (i.e. able to compile programs on its own), unstable, or the build system is simply much faster. For many embedded systems, cross-compilation is simply the only possible way to build programs, as the target hardware does not have the resources or capabilities.
交叉编译通常比本地编译更容易引发错误。因此,交叉编译一般只用于目标平台不能自洽(比如说,目标平台无法完成程序编译),不稳定或者编译平台速度更快的情况下。对大多数嵌入式系统来说,由于目标平台的执行能力或系统资源有限,交叉编译是唯一可行的编译方式。
相关阅读:
- 什么是操作系统 (admin, 2007-4-09)
- utu2440-F 三星2440开发板V4.1[核心板+底板] (开发板商城, 2007-10-09)
- utu2440-F 三星2440开发板套餐1[配3.5寸LCD,横屏显示] (开发板商城, 2007-10-10)
- utu2410-S 工控单板机V3.0套餐1 ARM开发板 ARM9开发板 (开发板商城, 2007-10-11)
- utu2440-S 工控单板机V3.0套餐1[配3.5LCD] arm9开发板 ARM (开发板商城, 2007-10-11)
- 扬创 ARM9 2440 开发板 utu Linux,Wince用户开发手册下载 (开发板商城, 2007-11-23)
- 什么是linux, linux简介 (开发板商城, 2007-12-29)
- 什么是GCC编译器 GCC编译器介绍 (开发板商城, 2007-12-29)
- 深度剖析E680G开发一,所谓的交叉编译环境GCC (开发板商城, 2008-3-10)
导入论坛
收藏
分享给好友
管理
举报
TAG:
linux
交叉编译