haskell.compiler.*: check bintools.hasGold before enabling ld.gold

This commit is contained in:
sternenseemann 2021-08-03 13:33:12 +02:00
parent 4c75874560
commit 0908812372
4 changed files with 8 additions and 4 deletions

View file

@ -122,7 +122,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

View file

@ -131,7 +131,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

View file

@ -123,7 +123,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

View file

@ -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