diff options
-rw-r--r-- | pkgs/stdenv/linux/default.nix | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index ddfbc11b6405c..e227b6850773c 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -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. |