Skip to content

audiofile: Don't pass '-lgcc' if using LLVM env#195971

Closed
peperunas wants to merge 1 commit intoNixOS:masterfrom
peperunas:audiofile-i686
Closed

audiofile: Don't pass '-lgcc' if using LLVM env#195971
peperunas wants to merge 1 commit intoNixOS:masterfrom
peperunas:audiofile-i686

Conversation

@peperunas
Copy link
Copy Markdown
Contributor

Description of changes

This issue is part of a series of bugfixes to improve the i686 cross-compilation pipeline.

Tracking issue: #195967

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/)
  • 22.11 Release Notes (or backporting 22.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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@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 14, 2022

# fix build with gcc9
NIX_CFLAGS_LINK = lib.optional (stdenv.system == "i686-linux") "-lgcc";
NIX_CFLAGS_LINK = lib.optional (stdenv.system == "i686-linux" && !(stdenv.hostPlatform.useLLVM or false)) "-lgcc";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think you want to check stdenv.cc.isClang instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I am not sure with Clang only; during my tests, I used a pure LLVM toolchain so I wouldn't be sure to check only for clang.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nix-repl> llvmPackages.stdenv.cc.isClang
true

@Artturin
Copy link
Copy Markdown
Member

Artturin commented Nov 8, 2023

No longer passes lgcc

@Artturin Artturin closed this Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants