Skip to content
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

newlib: fix newlib host/target workaround #266364

Merged
2 commits merged into from Nov 12, 2023
Merged

newlib: fix newlib host/target workaround #266364

2 commits merged into from Nov 12, 2023

Conversation

ghost
Copy link

@ghost ghost commented Nov 9, 2023

Should fix the failing Hydra builds for newlib.x86_64-linux

Description of changes

The newlib configury uses host to refer to the platform which is
being used to compile newlib. Ugh. It does this because of its
history: newlib used to be distributed with and built as part of
gcc.

To prevent nixpkgs from going insane, this package presents the
"normal" view to the outside world: the binaries in $out will
execute on stdenv.hostPlatform. We then fool newlib's build
process into doing the right thing.

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/)
  • 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.

@ghost ghost requested a review from sternenseemann November 9, 2023 00:48
@ghost ghost added the 0.kind: ZHF Fixes Fixes during the Zero Hydra Failures (ZHF) campaign label Nov 9, 2023
@ghost
Copy link
Author

ghost commented Nov 9, 2023

@ghost ghost marked this pull request as ready for review November 9, 2023 00:48
@ghost

This comment was marked as duplicate.

@ghost

This comment was marked as outdated.

@ghost

This comment was marked as outdated.

@ghost ghost marked this pull request as draft November 9, 2023 01:33
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Nov 9, 2023
Adam Joseph added 2 commits November 8, 2023 17:48
The newlib configury uses `host` to refer to the platform which is
being used to compile newlib.  Ugh.  It does this because of its
history: newlib used to be distributed with and built as part of
gcc.

To prevent nixpkgs from going insane, this package presents the
"normal" view to the outside world: the binaries in $out will
execute on `stdenv.hostPlatform`.  We then fool newlib's build
process into doing the right thing.
@ghost
Copy link
Author

ghost commented Nov 9, 2023

@ofborg build newlib
@ofborg build pkgsCross.arm-embedded.newlib

@ghost
Copy link
Author

ghost commented Nov 9, 2023

  • newlib on x86_64-linux — Success Details
  • pkgsCross.arm-embedded.newlib on x86_64-linux — Success

@ghost ghost marked this pull request as ready for review November 9, 2023 02:10
@delroth delroth added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Nov 12, 2023
@ghost ghost merged commit 1e47c87 into NixOS:master Nov 12, 2023
@ghost ghost deleted the pr/newlib/fixbuilds branch November 12, 2023 02:12
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: ZHF Fixes Fixes during the Zero Hydra Failures (ZHF) campaign 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 12.approvals: 1 This PR was reviewed and approved by one reputable person
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants