diff options
Diffstat (limited to 'pkgs/development/compilers/ghc/head.nix')
-rw-r--r-- | pkgs/development/compilers/ghc/head.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index a7f7c9db48143..f2c965ebe47a4 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -133,7 +133,8 @@ let # Use gold either following the default, or to avoid the BFD linker due to some bugs / perf issues. # But we cannot avoid BFD when using musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856 # see #84670 and #49071 for more background. - useLdGold = targetPlatform.linker == "gold" || (targetPlatform.linker == "bfd" && !targetPlatform.isMusl); + useLdGold = targetPlatform.linker == "gold" || + (targetPlatform.linker == "bfd" && (targetPackages.stdenv.cc.bintools.bintools.hasGold or false) && !targetPlatform.isMusl); runtimeDeps = [ targetPackages.stdenv.cc.bintools |