diff options
author | Alp Mestanogullari <alpmestan@gmail.com> | 2019-07-13 00:42:02 +0200 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2019-08-05 07:50:26 +0200 |
commit | 29f2f04ded458e298e70884c2fd10e05e336f598 (patch) | |
tree | b7409c290eb2caf4a6b2d9c456ed3ce9ce2cd185 /pkgs/development/compilers/ghc | |
parent | 0b9b95d5b195b6f061ff763aa58a963cfb41d08b (diff) | |
download | nixpkgs-29f2f04ded458e298e70884c2fd10e05e336f598.tar nixpkgs-29f2f04ded458e298e70884c2fd10e05e336f598.tar.gz nixpkgs-29f2f04ded458e298e70884c2fd10e05e336f598.tar.bz2 nixpkgs-29f2f04ded458e298e70884c2fd10e05e336f598.tar.lz nixpkgs-29f2f04ded458e298e70884c2fd10e05e336f598.tar.xz nixpkgs-29f2f04ded458e298e70884c2fd10e05e336f598.tar.zst nixpkgs-29f2f04ded458e298e70884c2fd10e05e336f598.zip |
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.
Diffstat (limited to 'pkgs/development/compilers/ghc')
-rw-r--r-- | pkgs/development/compilers/ghc/8.2.2.nix | 2 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/8.4.4.nix | 2 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/8.6.4.nix | 2 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/8.6.5.nix | 2 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/8.8.1.nix | 2 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/head.nix | 3 |
6 files changed, 7 insertions, 6 deletions
diff --git a/pkgs/development/compilers/ghc/8.2.2.nix b/pkgs/development/compilers/ghc/8.2.2.nix index 9b942da25a6..ba4933363c1 100644 --- a/pkgs/development/compilers/ghc/8.2.2.nix +++ b/pkgs/development/compilers/ghc/8.2.2.nix @@ -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" diff --git a/pkgs/development/compilers/ghc/8.4.4.nix b/pkgs/development/compilers/ghc/8.4.4.nix index a355f57a5c7..a90af60de43 100644 --- a/pkgs/development/compilers/ghc/8.4.4.nix +++ b/pkgs/development/compilers/ghc/8.4.4.nix @@ -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" diff --git a/pkgs/development/compilers/ghc/8.6.4.nix b/pkgs/development/compilers/ghc/8.6.4.nix index ff9ef0a5c38..97ca95812d6 100644 --- a/pkgs/development/compilers/ghc/8.6.4.nix +++ b/pkgs/development/compilers/ghc/8.6.4.nix @@ -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" diff --git a/pkgs/development/compilers/ghc/8.6.5.nix b/pkgs/development/compilers/ghc/8.6.5.nix index 44ad6da2ff5..d264cfda2a3 100644 --- a/pkgs/development/compilers/ghc/8.6.5.nix +++ b/pkgs/development/compilers/ghc/8.6.5.nix @@ -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" diff --git a/pkgs/development/compilers/ghc/8.8.1.nix b/pkgs/development/compilers/ghc/8.8.1.nix index 07b9cd1e1aa..6899ad4fd48 100644 --- a/pkgs/development/compilers/ghc/8.8.1.nix +++ b/pkgs/development/compilers/ghc/8.8.1.nix @@ -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" diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index 2edb49bd463..539d0408681 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -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" |