GCC Canadian Cross: Difference between revisions

From OSDev.wiki
Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content added Content deleted
No edit summary
 
m (tt->code&addstub)
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Stub}}
== Introduction ==
A Canadian Cross is to first build a cross-compiler for system Y (the host) on system X (the build-system). You would then use that cross-compiler, setting <code>--build=<where this compiler runs> --host=<where the compiler you're building shall run> --target=<where the executables the compiler you're building will build shall run></code>. This explanation alone should be sufficient to show why this is both non-trivial and error-prone.


==="Minor" Canadian Cross===
A "Canadian Cross" is the black magic of cross-compiling: On platform A, compile a cross-compiler to run on platform B that generates executables for platform C.


Building a cross-compiler takes some time, so you might want to use a faster machine (like, a PIV) to build a cross-compiler for a lesser machine (like, a Pentium laptop). You don't really need the initial cross-compiler for this, as the system compiler on the build machine (PIV) can generate binaries for the host machine (Pentium) alright.
It's so "black" that we have yet to write something about it. ;)


[[Category:Compilers]]
[[Category:Compilers]]

Latest revision as of 01:13, 10 September 2018

This page is a stub.
You can help the wiki by accurately adding more contents to it.

A Canadian Cross is to first build a cross-compiler for system Y (the host) on system X (the build-system). You would then use that cross-compiler, setting --build=<where this compiler runs> --host=<where the compiler you're building shall run> --target=<where the executables the compiler you're building will build shall run>. This explanation alone should be sufficient to show why this is both non-trivial and error-prone.

"Minor" Canadian Cross

Building a cross-compiler takes some time, so you might want to use a faster machine (like, a PIV) to build a cross-compiler for a lesser machine (like, a Pentium laptop). You don't really need the initial cross-compiler for this, as the system compiler on the build machine (PIV) can generate binaries for the host machine (Pentium) alright.