欢迎访问工聚网上海,祝您购物愉快! 工聚网 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.
交叉编译通常比本地编译更容易引发错误。因此,交叉编译一般只用于目标平台不能自洽(比如说,目标平台无法完成程序编译),不稳定或者编译平台速度更快的情况下。对大多数嵌入式系统来说,由于目标平台的执行能力或系统资源有限,交叉编译是唯一可行的编译方式。

TAG: linux 交叉编译

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2008-11-21  
      1
2345678
9101112131415
16171819202122
23242526272829
30      

数据统计

  • 访问量: 13012
  • 日志数: 18
  • 图片数: 3
  • 商品数: 65
  • 文件数: 1
  • 书签数: 4
  • 建立时间: 2007-02-07
  • 更新时间: 2008-11-09

RSS订阅

Open Toolbar