diff --git a/doc/stdenv/cross-compilation.chapter.md b/doc/stdenv/cross-compilation.chapter.md index 7b8f2b4ce6cdb..3cef3a92ed51d 100644 --- a/doc/stdenv/cross-compilation.chapter.md +++ b/doc/stdenv/cross-compilation.chapter.md @@ -44,7 +44,29 @@ The exact schema these fields follow is a bit ill-defined due to a long and conv `config` -: This is a 3- or 4- component shorthand for the platform. Examples of this would be `x86_64-unknown-linux-gnu` and `aarch64-apple-darwin14`. This is a standard format called the "LLVM target triple", as they are pioneered by LLVM. In the 4-part form, this corresponds to `[cpu]-[vendor]-[os]-[abi]`. This format is strictly more informative than the "Nix host double", as the previous format could analogously be termed. This needs a better name than `config`! +: This is a 3-, 4-, or 5-component shorthand for the platform. + + Format: + + - `[cpu]-[vendor]-[os]` + - `[cpu]-[vendor]-[os]-[abi]` + - `[cpu]-[vendor]-[os]-[libc][abi]` + + :::{.note} + There is no hyphen separating the `[libc]` field from the `[abi]` field. + ::: + + Examples: + + - `aarch64-apple-darwin14` + - `x86_64-unknown-linux-gnux32` + - `mips64el-unknown-linux-muslabin32` + + This is a standard format [pioneered by autoconf](https://www.gnu.org/software/autoconf/manual/autoconf-2.65/html_node/System-Type.html#System-Type) and [adopted by LLVM](https://clang.llvm.org/docs/CrossCompilation.html#target-triple). + It is strictly more informative than the platform string `[cpu]-[os]` used by Nix. + + +This field should be *canonicalized*. The rules for canonicalizing a tuple are kept in the `config.sub` file in the source code for `gnu-config`. `parsed`