Re: [討論] configure build host target 什麼意思

作者: feelthat (雲端傳送)   2026-09-12 21:28:15
GNU Autotools 的 build / host / target 術語,最初是專門為編譯 GCC 打造的。
GCC命名前綴是target
For native builds, some of the installed programs are also
installed with the target alias in front of their name
https://gcc.gnu.org/install/configure.html
原始定義正確的邏輯
Original definition of correct logic
1. July 8, 1999 describes events that occurred in 1995.
http://www.kilmnj.com/g77/what.html
Around late 1995, I did a criss-cross build of g77, which entailed building a
version of g77 on a Linux/Intel platform that
ran on a DOS/Intel platform and generated code for an ecoff/i960 machine.
It was about a weeks' work, but some of the problems I ran into have been
fixed since then in g77, gcc, and the cross-platform development tools
provided (generously) by Cygnus Support. (Cygnus and others use the term
Canadian Cross to mean what
I call criss-cross, that is, three-system, builds, where a compiler for
machine C is built to run on B from machine A.)
2. The document was created on March, 17 2001
https://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc_3.html
"3. Installing GNU CC"
The build machine is the system which you are using,
the host machine is the system where you want to run the resulting compiler,
and the target machine is the system for which you want the compiler to
generate code.
3.
The GNU configure and build system 1998
https://www.mediafire.com/view/tk1v3pw53z17lpe/build_host_target_1998.jpg/file
page. 28
6.2 Canadian Cross Concepts
The system on which the tools are being built is called the build system.
The system on which the tools will run is called the host system.
An example of building a cross compiler using a Canadian Cross would be
building a
Windows cross MIPS ELF compiler on a GNU/Linux system. In this case the build
system
would be GNU/Linux, the host system would be Windows, and the target system
would
be MIPS ELF.
4.
The Definitive Guide to GCC Second Edition 2006
https://www.mediafire.com/view/6kl9xbzfz0a7erq/build_host_target_2006.jpg/file
Page. 233
CHAPTER 11 COMPILING GCC
The build system is the machine on which you build GCC;
the host system is the machine on which the completed compiler will run;
and the target system is the machine for which the compiler will generate
code.
To build GCC for a Microsoft Windows based Intel x86 system, you could use a
cross-compiler executing on a SPARC system running Solaris that know how to
create a binary that run on a W-intel system
The logic completely corresponds to the second statement:
To execute sparc-solaris-gcc in Sparc and generate gcc name x86-windows-gcc,
build is sparc.
x86-windows-gcc run in intel x86 and generate tvprogram,
host is intel x86.
tvprogram run in intel x86
target is intel x86.
5.
https://stackoverflow.com/questions/47010422/cross-compilation-terminologies-build-host-and-target
I have a PowerPC machine making a compiler that you will run
on an x86 machine that will This creates binaries that run on an ARM
architecture.
That makes the PPC the build, the x86 the host, and the target the ARM.
The logic completely corresponds to the second statement:
To execute powerpc-linux-gcc in powerpc and generate gcc name arm64-linux-gcc,
build is powerpc.
arm64-linux-gcc run in intel x86 and generate tvprogram,
host is intel x86.
tvprogram run in arm64,
target is arm64.
6.
https://blog.csdn.net/liufuchun111/article/details/81509651
(google translate to english)
./configure

Links booklink

Contact Us: admin [ a t ] ucptt.com