Skip to content

Conversation

@Artturin
Copy link
Member

@Artturin Artturin commented Oct 2, 2023

Rename files in bootstrap-files/ to match jobs in make-bootstrap-tools-cross.

Should make automating the bootstrap files easier.

$ nix repl --file ./pkgs/top-level/release-cross.nix
nix-repl> bootstrapTools
{ aarch64-linux = { ... }; aarch64-linux-musl = { ... }; armv5tel-linux = { ... }; armv6l-linux = { ... }; armv6l-linux-musl = { ... }; armv7l-linux = {... }; mips64el-linux-gnuabi64 = { ... }; mips64el-linux-gnuabin32 = { ... }; mipsel-linux-gnu = { ... }; powerpc64le-linux = { ... }; riscv64-linux = {... }; x86_64-linux-musl = { ... }; }

Additionally if non-linux bootstrap files are added to make-bootstrap-tools-cross then there won't be any renaming needed.

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added the 6.topic: stdenv Standard environment label Oct 2, 2023
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the -gnu because it does not seem significant

@Artturin Artturin requested review from a user and oxalica October 2, 2023 07:21
@ofborg ofborg bot added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Oct 2, 2023
@alyssais
Copy link
Member

alyssais commented Oct 2, 2023

@ofborg eval

@alyssais
Copy link
Member

alyssais commented Oct 2, 2023

IMO -gnu is not added because that will likely be the default in nixpkgs always and other chains should do it like musl.

I would much prefer we always use a full triple, e.g. x86_64-unknown-linux-gnu. If you want easier automation, it'll be easier if every bootstrap platform consistently uses the same format.

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Oct 2, 2023
@Artturin Artturin force-pushed the renamebootstrapfiles branch 2 times, most recently from 31593ee to 83f9d40 Compare October 3, 2023 18:22
@alyssais alyssais requested a review from Ericson2314 October 3, 2023 20:30
Copy link
Member

@alyssais alyssais left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Maybe needs a squash?

Rename files in `bootstrap-files/` to match jobs in `make-bootstrap-tools-cross`.

Should make automating the bootstrap files easier.

```nix
$ nix repl --file ./pkgs/top-level/release-cross.nix
nix-repl> bootstrapTools
{ aarch64-unknown-linux-gnu = { ... }; aarch64-unknown-linux-musl = { ... }; armv5tel-unknown-linux-gnueabi = { ... }; armv6l-unknown-linux-gnueabihf = { ... }; armv6l-unknown-linux-musleabihf = { ... }; armv7l-unknown-linux-gnueabihf = { ... }; mips64el-unknown-linux-gnuabi64 = {... }; mips64el-unknown-linux-gnuabin32 = { ... }; mipsel-unknown-linux-gnu = { ... }; powerpc64le-unknown-linux-gnu = { ... }; riscv64-unknown-linux-gnu = { ... }; x86_64-unknown-linux-musl = { ... }; }
```

Additionally if non-linux bootstrap files are added to
`make-bootstrap-tools-cross` then there won't be any renaming needed.
@Artturin Artturin force-pushed the renamebootstrapfiles branch from 83f9d40 to 1270ef5 Compare October 3, 2023 20:35
@Artturin Artturin marked this pull request as ready for review October 3, 2023 20:39
@delroth delroth added the 12.approvals: 2 This PR was reviewed and approved by two persons. label Oct 3, 2023
@Ericson2314 Ericson2314 merged commit 516b57b into NixOS:master Oct 4, 2023
else ./bootstrap-files/mips64el.nix);
powerpc64le-linux = import ./bootstrap-files/powerpc64le.nix;
riscv64-linux = import ./bootstrap-files/riscv64.nix;
then ./bootstrap-files/mips64el-unknown-linux-gnuabin32.nix.nix
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
then ./bootstrap-files/mips64el-unknown-linux-gnuabin32.nix.nix
then ./bootstrap-files/mips64el-unknown-linux-gnuabin32.nix

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Artturin Artturin deleted the renamebootstrapfiles branch July 23, 2025 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: cross-compilation Building packages on a different platform than they will be used on 6.topic: stdenv Standard environment 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants