Update doc/stdenv/cross-compilation.chapter.md

Co-authored-by: Ben Siraphob <bensiraphob@gmail.com>
This commit is contained in:
Adam Joseph 2022-04-03 17:43:52 +00:00 committed by GitHub
parent c9d66a7fff
commit 7dbe7487b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,17 +86,17 @@ Only nine dependency types matter in practice:
#### Possible dependency types {#possible-dependency-types}
| Dependency type | Dependencys host platform | Dependencys target platform |
|---------------------|----------------------------|------------------------------|
| build→ * | build | (none) |
| build→ build | build | build |
| build→ host | build | host |
| build→ target | build | target |
| host→ * | host | (none) |
| host→ host | host | host |
| host→ target | host | target |
| target→ * | target | (none) |
| target→ target | target | target |
| Dependency type | Dependencys host platform | Dependencys target platform |
|-----------------|----------------------------|------------------------------|
| build → * | build | (none) |
| build → build | build | build |
| build → host | build | host |
| build → target | build | target |
| host → * | host | (none) |
| host → host | host | host |
| host → target | host | target |
| target → * | target | (none) |
| target → target | target | target |
Let's use `g++` as an example to make this table clearer. `g++` is a C++ compiler written in C. Suppose we are building `g++` with a `(build, host, target)` platform triple of `(foo, bar, baz)`. This means we are using a `foo`-machine to build a copy of `g++` which will run on a `bar`-machine and emit binaries for the `baz`-machine.