Skip to content

make-bootstrap-tools-cross: add powerpc64-unknown-linux-gnuabielfv1#419955

Merged
Aleksanaa merged 1 commit intoNixOS:masterfrom
OPNA2608:init/ppc64elfv1-cross-bootstrapTools
Jul 3, 2025
Merged

make-bootstrap-tools-cross: add powerpc64-unknown-linux-gnuabielfv1#419955
Aleksanaa merged 1 commit intoNixOS:masterfrom
OPNA2608:init/ppc64elfv1-cross-bootstrapTools

Conversation

@OPNA2608
Copy link
Contributor

@OPNA2608 OPNA2608 commented Jun 25, 2025

So hydra can cross-compile some bootstrap-files for the next step.

ppc64 got turned into an alias for ppc64-elfv2 in #418443, so switch it to the proper attribute as well.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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/)
  • Nixpkgs 25.11 Release Notes (or backporting 24.11 and 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 24.11 and 25.05 NixOS Release notes)
    • (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, pkgs/README.md, maintainers/README.md and other contributing documentation in corresponding paths.

Add a 👍 reaction to pull requests you find important.

@ofborg ofborg bot added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Jun 25, 2025
@nixpkgs-ci nixpkgs-ci 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. 6.topic: stdenv Standard environment labels Jun 25, 2025
@OPNA2608
Copy link
Contributor Author

Can build the bootstrapFiles with #419970 applied, haven't checked if they actually work yet.

@OPNA2608
Copy link
Contributor Author

OPNA2608 commented Jun 27, 2025

Cross-compiled the bootstrapFiles on my x86_64 machine, copied them to my powerpc64 machine, hooked them up in the linux stdenv code and built my way to stdenv - after fixing some test failures in coreutils/diffutils/gnugrep & an issue JIT-enabled PCRE2 along the way. I think this should work.

puna@HC ~/D/nixpkgs (master)> nix-build --no-out-link . --argstr localSystem powerpc64-unknown-linux-gnuabielfv1 -A hello
/nix/store/bc2wzvayx88ipn6d0fxzwny1zhq1x8s5-hello-2.12.2
puna@HC ~/D/nixpkgs (master)> file /nix/store/bc2wzvayx88ipn6d0fxzwny1zhq1x8s5-hello-2.12.2/bin/hello 
/nix/store/bc2wzvayx88ipn6d0fxzwny1zhq1x8s5-hello-2.12.2/bin/hello: ELF 64-bit MSB executable, 64-bit PowerPC or cisco 7500, Power ELF V1 ABI, version 1 (SYSV), dynamically linked, interpreter /nix/store/4hmb090mxa5gcqn6wxnj6isb5zlb6v03-glibc-2.40-66/lib/ld64.so.1, for GNU/Linux 3.10.0, not stripped
puna@HC ~/D/nixpkgs (master)> /nix/store/bc2wzvayx88ipn6d0fxzwny1zhq1x8s5-hello-2.12.2/bin/hello 
Hello, world!

@OPNA2608 OPNA2608 marked this pull request as ready for review June 27, 2025 18:16
@OPNA2608 OPNA2608 mentioned this pull request Jun 30, 2025
16 tasks
@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jul 3, 2025
@Aleksanaa Aleksanaa merged commit f29a69c into NixOS:master Jul 3, 2025
35 of 36 checks passed
@github-project-automation github-project-automation bot moved this to Done in Stdenv Jul 3, 2025
@alyssais
Copy link
Member

alyssais commented Jul 3, 2025

Do we really need both?

@Aleksanaa
Copy link
Member

To avoid another lengthy discussion about whether elfv2 should be temporarily removed, I guess.

It's fine to support both though. We have also added boostrap for musl, for example.

@alyssais
Copy link
Member

alyssais commented Jul 3, 2025

Right, I guess otherwise you'd need to cross compile during bootstrap.

@emilazy emilazy mentioned this pull request Sep 7, 2025
13 tasks
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: 1 This PR was reviewed and approved by one person.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants