ghc: always use ld.gold
gold is known to speed up GHC builds considerably, saving up to many seconds when linking large Haskell applications, so this patch configures all non-binary GHC derivations to use gold.
This commit is contained in:
parent
0b9b95d5b1
commit
29f2f04ded
@ -166,7 +166,7 @@ stdenv.mkDerivation (rec {
|
||||
export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
|
||||
export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
|
||||
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString targetPlatform.isAarch32 ".gold"}"
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld.gold"
|
||||
export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
|
||||
export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
|
||||
export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
|
||||
|
@ -126,7 +126,7 @@ stdenv.mkDerivation (rec {
|
||||
export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
|
||||
export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
|
||||
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString targetPlatform.isAarch32 ".gold"}"
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld.gold"
|
||||
export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
|
||||
export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
|
||||
export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
|
||||
|
@ -125,7 +125,7 @@ stdenv.mkDerivation (rec {
|
||||
export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
|
||||
export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
|
||||
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString targetPlatform.isAarch32 ".gold"}"
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld.gold"
|
||||
export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
|
||||
export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
|
||||
export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
|
||||
|
@ -125,7 +125,7 @@ stdenv.mkDerivation (rec {
|
||||
export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
|
||||
export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
|
||||
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString targetPlatform.isAarch32 ".gold"}"
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld.gold"
|
||||
export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
|
||||
export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
|
||||
export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
|
||||
|
@ -110,7 +110,7 @@ stdenv.mkDerivation (rec {
|
||||
export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
|
||||
export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
|
||||
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString targetPlatform.isAarch32 ".gold"}"
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld.gold"
|
||||
export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
|
||||
export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
|
||||
export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
|
||||
|
@ -119,7 +119,8 @@ stdenv.mkDerivation (rec {
|
||||
export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
|
||||
export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
|
||||
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString targetPlatform.isAarch32 ".gold"}"
|
||||
# and more generally have a faster linker.
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld.gold"
|
||||
export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
|
||||
export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
|
||||
export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
|
||||
|
Loading…
Reference in New Issue
Block a user