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

gcc: always inhibit libc in cross with same configs #260181

Merged
merged 1 commit into from
Oct 11, 2023

Conversation

alyssais
Copy link
Member

Description of changes

It's not just gcc->clang cross compilation that produces different platforms with equal configs — dynamic->static cross compilation can have the same result (e.g. pkgsMusl.pkgsStatic). So, remove the check for LLVM, but keep the check that the configs match.

This fixes pkgsMusl.nix on x86_64-linux, which depends on pkgsMusl.pkgsStatic.buildPackages.gccWithoutTargetLibc.cc.

Fixes: 926c920 ("gcc: tighten condition for inhibit_libc=true")

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.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.

@alyssais alyssais added 6.topic: cross-compilation Building packages on a different platform than they will be used on 6.topic: static 6.topic: musl Running or building packages with musl libc labels Oct 10, 2023
@alyssais alyssais requested review from Artturin, yu-re-ka and a user October 10, 2023 09:52
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild 10.rebuild-linux: 0 This PR does not cause any packages to rebuild labels Oct 10, 2023
It's not just gcc->clang cross compilation that produces different
platforms with equal configs — dynamic->static cross compilation can
have the same result (e.g. pkgsMusl.pkgsStatic).  So, remove the check
for LLVM, but keep the check that the configs match.

This fixes pkgsMusl.nix on x86_64-linux, which depends on
pkgsMusl.pkgsStatic.buildPackages.gccWithoutTargetLibc.cc.

Fixes: 926c920 ("gcc: tighten condition for inhibit_libc=true")
@alyssais alyssais changed the base branch from staging-next to master October 10, 2023 10:59
@delroth delroth added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Oct 10, 2023
@Artturin Artturin merged commit 8eae9c9 into NixOS:master Oct 11, 2023
23 checks passed
@alyssais alyssais deleted the inhibit_libc branch October 13, 2023 15:32
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: musl Running or building packages with musl libc 6.topic: static 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild 10.rebuild-linux: 0 This PR does not cause any packages to rebuild 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.

4 participants