diff options
author | Adam Joseph <adam@westernsemico.com> | 2023-05-07 01:27:01 -0700 |
---|---|---|
committer | Adam Joseph <adam@westernsemico.com> | 2023-05-09 00:16:24 -0700 |
commit | 0e9ef0a07d9723c8e6b4f0cdbd81cbcf3407046a (patch) | |
tree | 8f59629761cf273fe7d4a579d5f77fccb8c8ec39 /pkgs/build-support/cc-wrapper | |
parent | 849e9aa221faf64a5a60c346b36c2a3bb7dc1608 (diff) | |
download | nixpkgs-0e9ef0a07d9723c8e6b4f0cdbd81cbcf3407046a.tar nixpkgs-0e9ef0a07d9723c8e6b4f0cdbd81cbcf3407046a.tar.gz nixpkgs-0e9ef0a07d9723c8e6b4f0cdbd81cbcf3407046a.tar.bz2 nixpkgs-0e9ef0a07d9723c8e6b4f0cdbd81cbcf3407046a.tar.lz nixpkgs-0e9ef0a07d9723c8e6b4f0cdbd81cbcf3407046a.tar.xz nixpkgs-0e9ef0a07d9723c8e6b4f0cdbd81cbcf3407046a.tar.zst nixpkgs-0e9ef0a07d9723c8e6b4f0cdbd81cbcf3407046a.zip |
cc-wrapper: when merging gcc32 and gcc64, merge libgcc as well
Our gcc_multi and glibc_multi expressions merge together a 32-bit-targeted and 64-bit-targeted gcc. However they do not thread through the passthru.libgcc from these merged gccs. This commit corrects that. It also extends passthru.libgcc to allow a *list* rather than just a single outpath. Resolves part of #221891 (at least getting it back to the error message it gave before).
Diffstat (limited to 'pkgs/build-support/cc-wrapper')
-rw-r--r-- | pkgs/build-support/cc-wrapper/default.nix | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index bc9c199f778..77ecaf098ea 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -364,9 +364,9 @@ stdenv.mkDerivation { '' # this ensures that when clang passes -lgcc_s to lld (as it does # when building e.g. firefox), lld is able to find libgcc_s.so - + lib.optionalString (gccForLibs?libgcc) '' - echo "-L${gccForLibs.libgcc}/lib" >> $out/nix-support/cc-ldflags - '') + + concatMapStrings (libgcc: '' + echo "-L${libgcc}/lib" >> $out/nix-support/cc-ldflags + '') (lib.toList (gccForLibs.libgcc or []))) ## ## General libc support |