-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Docs: fix "building" documentation w.r.t. meson #12977
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
||
``` | ||
<cpu>-<vendor>-<os>[<version>][-<abi>] | ||
``` | ||
|
||
When Nix is built such that `./configure` is passed any of the `--host`, `--build`, `--target` options, the value is based on the output of [`config.sub`](https://github.com/nixos/nix/blob/master/config/config.sub) ([upstream](https://git.savannah.gnu.org/cgit/config.git/tree/config.sub)): | ||
When cross-compiling Nix with Meson, you need to specify a [cross-file](https://mesonbuild.com/Cross-compilation.html) using the `--cross-file` option. Cross-files define the target architecture and toolchain. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should point people to the cross flake outputs here (e.g. nix build .#nix-everything-riscv64-unknown-linux-gnu
).
Co-authored-by: Eelco Dolstra <[email protected]>
|
||
``` | ||
<cpu>-<vendor>-<os>[<version>][-<abi>] | ||
``` | ||
|
||
When Nix is built such that `./configure` is passed any of the `--host`, `--build`, `--target` options, the value is based on the output of [`config.sub`](https://github.com/nixos/nix/blob/master/config/config.sub) ([upstream](https://git.savannah.gnu.org/cgit/config.git/tree/config.sub)): | ||
When cross-compiling Nix with Meson, you need to specify a [cross-file](https://mesonbuild.com/Cross-compilation.html) using the `--cross-file` option. Cross-files define the target architecture and toolchain. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When cross-compiling Nix with Meson, you need to specify a [cross-file](https://mesonbuild.com/Cross-compilation.html) using the `--cross-file` option. Cross-files define the target architecture and toolchain. | |
When cross-compiling Nix with Meson for local development, you need to specify a [cross-file](https://mesonbuild.com/Cross-compilation.html) using the `--cross-file` option. Cross-files define the target architecture and toolchain. | |
When cross-compiling Nix with Nix, Nixpkgs takes care of this for you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section isn't really about cross compiling, so I'm not sure that we need to be entirely specific in this particular place, but it'd be good to catch a somewhat lost reader here. Doing all this is quite the detour if you're not doing it for local dev.
``` | ||
<cpu>-<vendor>[-<kernel>]-<os> | ||
``` | ||
|
||
For historic reasons and backward-compatibility, some CPU and OS identifiers are translated from the GNU Autotools naming convention in [`configure.ac`](https://github.com/nixos/nix/blob/master/configure.ac) as follows: | ||
|
||
| `config.guess` | Nix | | ||
|----------------------------|---------------------| | ||
| `amd64` | `x86_64` | | ||
| `i*86` | `i686` | | ||
| `arm6` | `arm6l` | | ||
| `arm7` | `arm7l` | | ||
| `linux-gnu*` | `linux` | | ||
| `linux-musl*` | `linux` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should document how the system
differs from Meson's defaults likewise? we have
host_machine.cpu_family() + '-' + host_machine.system()
currently, but I recall there was an issue pointing out this cases a regression with Power CPUs, and responded that a PR making a special case would be welcome. That is the sort of thing we'd document here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#12769 this is the issue I was thinking of.
Motivation
fixes #12934
Context
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.