Skip to content

binutils: try to move headers around only when --host/--target differ#215989

Merged
yu-re-ka merged 1 commit intoNixOS:staging-nextfrom
trofi:binutils-not-quite-cross-fix
Feb 12, 2023
Merged

binutils: try to move headers around only when --host/--target differ#215989
yu-re-ka merged 1 commit intoNixOS:staging-nextfrom
trofi:binutils-not-quite-cross-fix

Conversation

@trofi
Copy link
Contributor

@trofi trofi commented Feb 12, 2023

Without the change pkgsMusl.pkgsStatic.buildPackages.binutils.bintools build fails as:

$ ln: failed to create symbolic link './include': File exists

This happens because both host and target are x86_64-unknown-linux-musl. But hostPlatform differs from targetPlatform by isStatic value.

By ./configure's standard it's not yet a cross-compilation. The change tries to move things around only when tuples change.

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.05 Release Notes (or backporting 22.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
  • Fits CONTRIBUTING.md.

Without the change `pkgsMusl.pkgsStatic.buildPackages.binutils.bintools`
build fails as:

    $ ln: failed to create symbolic link './include': File exists

This happens because both host and target are `x86_64-unknown-linux-musl`.
But `hostPlatform` differs from `targetPlatform` by `isStatic` value.

By `./configure`'s standard it's not yet a cross-compilation. The change
tries to move things around only when tuples change.
@yu-re-ka
Copy link
Contributor

Can confirm this diff fixes the build failure of pkgsMusl.pkgsStatic.buildPackages.binutils.bintools

@yu-re-ka yu-re-ka merged commit d381e51 into NixOS:staging-next Feb 12, 2023
@trofi trofi deleted the binutils-not-quite-cross-fix branch February 12, 2023 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants