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 ddfbc11b640..e227b685077 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. |