Skip to content

Conversation

@enkerewpo
Copy link
Contributor

@enkerewpo enkerewpo commented Apr 23, 2025

rt-tests: add cross compilation support

issue: #401023

  • 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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.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.

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 Apr 23, 2025
@enkerewpo enkerewpo marked this pull request as draft April 23, 2025 04:22
@NixOSInfra NixOSInfra added the 12.first-time contribution This PR is the author's first one; please be gentle! label Apr 23, 2025
@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Apr 23, 2025
@nix-owners nix-owners bot requested a review from poelzi April 23, 2025 04:30
@enkerewpo enkerewpo marked this pull request as ready for review April 23, 2025 14:53
Copy link
Contributor

@illdefined illdefined left a comment

Choose a reason for hiding this comment

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

I don’t think it makes sense to include gcc as an explicit dependency as the C compiler (which might not be GCC but Clang for example) is already provided through stdenv.

@illdefined
Copy link
Contributor

I am currently testing cross‐compilation for Aarch64 and RISC-V. I’ll post the results and approve this PR if successful.

@illdefined
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 401020 --package pkgsCross.riscv64.rt-tests --package rt-tests --package pkgsCross.aarch64-multiplatform.rt-tests


x86_64-linux

✅ 3 packages built:
  • pkgsCross.aarch64-multiplatform.rt-tests
  • pkgsCross.riscv64.rt-tests
  • rt-tests

aarch64-linux

✅ 2 packages built:
  • pkgsCross.riscv64.rt-tests
  • rt-tests

@illdefined
Copy link
Contributor

This appears to have resolved the cross‐compilation issue. Thanks for your contribution, @enkerewpo. If you have other packages with cross‐compilation problems, feel free to involve me as a reviewer.

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one person. label Apr 24, 2025
@uninsane uninsane merged commit 6eea7ca into NixOS:master Apr 26, 2025
28 checks passed
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 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person. 12.first-time contribution This PR is the author's first one; please be gentle!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants