mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 11:40:45 +00:00
stdenv: fix pkgsMusl
I broke `pkgsMusl` with #209870. Something odd is happening with `xgcc` (the temporary compiler that should be used only to compile `gcc`, although we are using it to compile a temporary `patchelf` too) and `libstdc++`. The temporary fix in this commit is to use `-static-libstdc++` for the ephemeral `patchelf` built by `xgcc`. It isn't pretty, but it appears to work. Incorporates: - https://github.com/NixOS/nixpkgs/pull/224945
This commit is contained in:
parent
6afd316cbc
commit
3778e07994
|
@ -458,6 +458,14 @@ in
|
|||
'';
|
||||
};
|
||||
};
|
||||
|
||||
# TODO(amjoseph): It is not yet entirely clear why this is necessary.
|
||||
# Something strange is going on with xgcc and libstdc++ on pkgsMusl.
|
||||
patchelf = super.patchelf.overrideAttrs(previousAttrs:
|
||||
lib.optionalAttrs super.stdenv.hostPlatform.isMusl {
|
||||
NIX_CFLAGS_COMPILE = (previousAttrs.NIX_CFLAGS_COMPILE or "") + " -static-libstdc++";
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
# `libtool` comes with obsolete config.sub/config.guess that don't recognize Risc-V.
|
||||
|
|
Loading…
Reference in a new issue