Re: triple definitions for cross-compiling runtime libraries
Simon Richter <[email protected]> Tue, 7 Apr 2026 15:12:29 +0900
| Newsgroups | gmane.comp.gcc.help |
|---|---|
| Message-ID | <[email protected]> |
Hi,
On 4/7/26 5:32 AM, Xaver Gruber via Gcc-help wrote:
> what are in perspective of the compiler and according to GNU/GCC the
> triples(host, build or target) of:
> - my machine executing cross-compilation
> - the Linux distribution I cross-compiled for?
"target" is specific to compiler tools, it does not exist for any other
project.
Cross-compiling any project uses the local machine as "build" and the
machine the code should run on as "host".
Building the cross-compiler itself uses the architecture the compiler
should emit code for as "target."
These can then be combined, i.e. if you cross-compile a cross-compiler,
you need both "host" (what the compiler should be running on) and
"target" (what the compiler should generate code for).
The standard libraries themselves need to be compiled with a
cross-compiler, but if you specify a different "host" than your "build"
system, you are building a compiler that doesn't run on your build
machine. That's not a big problem though, we just build two cross
compilers: one running on the build machine, to compile the standard
libraries, and one that is installed.
Simon