Skip to content

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

Merged
Artturin merged 1 commit intoNixOS:masterfrom
alyssais:inhibit_libc
Oct 11, 2023
Merged

gcc: always inhibit libc in cross with same configs#260181
Artturin merged 1 commit intoNixOS:masterfrom
alyssais:inhibit_libc

Conversation

@alyssais
Copy link
Copy Markdown
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 Static builds (e.g. pkgsStatic) 6.topic: musl Running or building packages with musl libc labels Oct 10, 2023
@alyssais alyssais requested review from a user, Artturin and yu-re-ka October 10, 2023 09:52
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 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 person. label Oct 10, 2023
@Artturin Artturin merged commit 8eae9c9 into NixOS:master Oct 11, 2023
@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 Static builds (e.g. pkgsStatic) 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants