diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2010-08-14 16:37:11 +0200 |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2010-08-14 16:37:11 +0200 |
commit | a211f4100d3e0196807dbd3b4f1839c41f79f5b1 (patch) | |
tree | d29a9ed57c0946e22afaed850658e4075c6ab1d9 /docs/6 - Toolchain types.txt | |
parent | ebaebdacf45166a587e4e4d2d5e7b2f7a08965e2 (diff) | |
download | crosstool-ng-a211f4100d3e0196807dbd3b4f1839c41f79f5b1.tar.gz crosstool-ng-a211f4100d3e0196807dbd3b4f1839c41f79f5b1.tar.bz2 crosstool-ng-a211f4100d3e0196807dbd3b4f1839c41f79f5b1.zip |
docs: split into multiple files
The overview.txt file has evolved into more than just an overview.
Split it into chapters, and include the misc tutorials.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Diffstat (limited to 'docs/6 - Toolchain types.txt')
-rw-r--r-- | docs/6 - Toolchain types.txt | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/docs/6 - Toolchain types.txt b/docs/6 - Toolchain types.txt new file mode 100644 index 00000000..a490a3b1 --- /dev/null +++ b/docs/6 - Toolchain types.txt @@ -0,0 +1,64 @@ +File.........: 6 - Toolchain types.txt +Copyrigth....: (C) 2010 Yann E. MORIN <yann.morin.1998@anciens.enib.fr> +License......: Creative Commons Attribution Share Alike (CC-by-sa), v2.5 + + +Toolchain types / +________________/ + + +There are four kinds of toolchains you could encounter. + +First off, you must understand the following: when it comes to compilers there +are up to four machines involved: + 1) the machine configuring the toolchain components: the config machine + 2) the machine building the toolchain components: the build machine + 3) the machine running the toolchain: the host machine + 4) the machine the toolchain is generating code for: the target machine + +We can most of the time assume that the config machine and the build machine +are the same. Most of the time, this will be true. The only time it isn't +is if you're using distributed compilation (such as distcc). Let's forget +this for the sake of simplicity. + +So we're left with three machines: + - build + - host + - target + +Any toolchain will involve those three machines. You can be as pretty sure of +this as "2 and 2 are 4". Here is how they come into play: + +1) build == host == target + This is a plain native toolchain, targetting the exact same machine as the + one it is built on, and running again on this exact same machine. You have + to build such a toolchain when you want to use an updated component, such + as a newer gcc for example. + crosstool-NG calls it "native". + +2) build == host != target + This is a classic cross-toolchain, which is expected to be run on the same + machine it is compiled on, and generate code to run on a second machine, + the target. + crosstool-NG calls it "cross". + +3) build != host == target + Such a toolchain is also a native toolchain, as it targets the same machine + as it runs on. But it is build on another machine. You want such a + toolchain when porting to a new architecture, or if the build machine is + much faster than the host machine. + crosstool-NG calls it "cross-native". + +4) build != host != target + This one is called a canadian-toolchain (*), and is tricky. The three + machines in play are different. You might want such a toolchain if you + have a fast build machine, but the users will use it on another machine, + and will produce code to run on a third machine. + crosstool-NG calls it "canadian". + +crosstool-NG can build all these kinds of toolchains (or is aiming at it, +anyway!) + +(*) The term Canadian Cross came about because at the time that these issues + were all being hashed out, Canada had three national political parties. + http://en.wikipedia.org/wiki/Cross_compiler |