“主机"一词的含义是什么?在'HOSTCC'和./configure --host吗? [英] What is the sense of the word "host" in 'HOSTCC' and ./configure --host?

查看:408
本文介绍了“主机"一词的含义是什么?在'HOSTCC'和./configure --host吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有一些程序的源代码,该源代码使用GNU自动工具,并且为了简单起见,可以说该程序绝不是任何类型的开发工具.如果我方便使用跨工具链,则可以使用以下命令针对平台procfoo-vendorbar-bazos进行交叉编译:

Suppose I have the source for some program, the source uses GNU autotools, and to keep it simple, let's say the program is in no way a development tool of any kind. If I have a cross-toolchain handy, I can configure to cross-compile for the platform procfoo-vendorbar-bazos using:

./configure --host=procfoo-vendorbar-bazos

但是,包括Linux 2.6在内的各种源代码版本都采用了安静的输出风格

However, in the quiet(er) style of output adopted by various source builds including Linux 2.6,

HOSTCC foo.c

表示foo.c是使用本机所用系统的本机编译器构建的,以区别于

means that foo.c is being built with a native compiler for system I'm building on, to differentiate from

CC bar.c

这意味着bar.c正在使用我要为其构建程序的系统的交叉编译器进行构建.

which means that bar.c is being build with the cross compiler for the system I'm building the program for.

我是不是在某个地方感到困惑,或者HOSTCC中的主机"不是从./configure --host的意义上来说意味着主机?

Did I get confused somewhere there, or does the 'host' in HOSTCC just not mean host in the sense of ./configure --host?

推荐答案

autoconf / automake 并没有真正的宿主编译器概念. $CC始终是目标编译器.如果您看到过$HOSTCC,它是开发人员正在查看的软件包的手动添加.

autoconf/automake do not really have a notion of host compiler. $CC is always the target compiler. If you ever see $HOSTCC, it is a manual addition by the developer of the package you are looking at.

--host指定要在哪个主机类型上运行生产的程序.

--host specifies on what host type the produced program is intended to be run on.

这篇关于“主机"一词的含义是什么?在'HOSTCC'和./configure --host吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆