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

cc-wrapper: Workaround gnuabielfv{1,2} support deficiency on Clang #297425

Open
wants to merge 1 commit into
base: staging
Choose a base branch
from

Conversation

OPNA2608
Copy link
Contributor

@OPNA2608 OPNA2608 commented Mar 20, 2024

Description of changes

Clang doesn't parse the "gnuabielfv{1,2}" part of the triplet as anything beyond "gnu", so desired ABI gets ignored.

Work around this by explicitly setting the ABI.


Follow-up to #307819 which fixes building LLVM on powerpc64, this gets llvmPackages*.stdenv working.

  • I haven't checked how this may affect musl, and
  • I'm not sure if checking for non-"gnu" has any point beyond signaling intention, because we assert on powerpc64{,le}-unknown-linux-gnu due to this exact ABI ambiguity. Maybe checking for non-"musl" would be better, since that only supports ELFv2?

Staging just so cc-wrapper stuff that might get sent there doesn't encounter any merge conflicts.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • powerpc64-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/)
  • 24.05 Release Notes (or backporting 23.05 and 23.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.

Add a 👍 reaction to pull requests you find important.

@OPNA2608 OPNA2608 changed the title cc-wrapper: Workaround gnuelfabiv{1,2} support deficiency on Clang cc-wrapper: Workaround gnuabielfv{1,2} support deficiency on Clang Mar 20, 2024
@rrbutani rrbutani added 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related 6.topic: stdenv Standard environment labels May 27, 2024
Clang doesn't parse the "gnuabielfv{1,2}" part of the triplet as anything beyond "gnu", so desired ABI gets ignored.

Work around this by explicitly setting the ABI.
@OPNA2608 OPNA2608 changed the base branch from master to staging August 9, 2024 14:24
@github-actions github-actions bot removed 6.topic: stdenv Standard environment 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related labels Aug 9, 2024
@OPNA2608 OPNA2608 marked this pull request as ready for review August 9, 2024 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants