Configure with Build, Host and Target

本文详细解释了在软件构建过程中使用`--host`、`--target`和`--build`参数的目的和用法,通过实例如`tslib`和`gcc`,展示了如何在不同系统间进行跨平台编译。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  • --host: In which system the generated program will run.
  • --build: In which system the program will be built.
  • --target: this option is only used to build a cross-compiling toolchain. When the tool chain generates executable program, in which target system the program will run.

An example of tslib (a mouse driver library)
'./configure --host=arm-linux --build=i686-pc-linux-gnu':

the dynamically library is built on a x86 linux computer but will be used for a embedded arm linux system.


An example of gcc:
'./configure --target=i686-pc-linux-gnu --host=arm-linux --build=i686-pc-linux-gnu':
  • A gcc compiler is build on x86 linux computer. [--build]
  • The gcc will be executed on an embedded arm linux system.[--host]
  • But the gcc will generate the binary program, which run in a x86 linux system. [--target]
references:

1) http://jingfenghanmax.blogspot.co.uk/2010/09/configure-with-host-target-and-build.html

2) http://gcc.gnu.org/onlinedocs//gccint/Configure-Terms.html


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值