Skip to content

binutils: fix cross compilation from darwin#169345

Merged
lovesegfault merged 1 commit intoNixOS:masterfrom
thefloweringash:binutils-cross-from-darwin
Apr 19, 2022
Merged

binutils: fix cross compilation from darwin#169345
lovesegfault merged 1 commit intoNixOS:masterfrom
thefloweringash:binutils-cross-from-darwin

Conversation

@thefloweringash
Copy link
Member

The libtool patch is required to correctly invoke the linker while
building, so it should depend on the build toolchain.

Description of changes

Addressing breakage reported in #134917 (comment)

This is only part of the story. There's still a problem with glibc and separateDebugInfo. If I turn that off I can build pkgsCross.aarch64-multiplatform.hello from x86_64-darwin via rosetta.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin (via rosetta)
    • 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/)
  • 22.05 Release Notes (or backporting 21.11 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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

The libtool patch is required to correctly invoke the linker while
building, so it should depend on the build toolchain.
@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Apr 19, 2022
@lovesegfault lovesegfault self-requested a review April 19, 2022 16:31
Copy link
Member

@lovesegfault lovesegfault left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix!

@lovesegfault
Copy link
Member

I imagine it needs to hit staging, not master?

@ofborg ofborg bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Apr 19, 2022
@lovesegfault
Copy link
Member

Well, seems like it doesn't trigger as many rebuilds as I thought.

I'm going to merge it.

@lovesegfault lovesegfault merged commit 59f5ec6 into NixOS:master Apr 19, 2022
@thefloweringash thefloweringash deleted the binutils-cross-from-darwin branch April 20, 2022 03:09
@thefloweringash
Copy link
Member Author

Well, seems like it doesn't trigger as many rebuilds as I thought.

Fortunately it only affects cross, so very few rebuilds.

Hydra evaluation to see the effects: https://hydra.nixos.org/eval/1756673

@Mindavi Mindavi added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Apr 27, 2022
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: darwin Running or building packages on Darwin 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants