From 849d47a9280e059bf6a6f8762431f04d4c12f02b Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 28 May 2022 16:38:42 +0100 Subject: [PATCH] ghc: use CXX=c++, not CXX=cxx Otherwise attempt to build ghcHEAD from local checkout fails as: $ nix build -L --impure --expr 'with import ~/nm {}; haskell.compiler.ghcHEAD.overrideAttrs (oa: { src = ./.; patches = []; nativeBuildInputs = oa.nativeBuildInputs ++ [ git ]; })' --keep-failed ... ghc> checking C++ standard library flavour... ./configure: line 11487: /nix/store/r7r10qvsqlnvbzjkjinvscjlahqbxifl-gcc-wrapper-11.3.0/bin/cxx: No such file or directory I think 'cxx' is not provided by stdenv. --- pkgs/development/compilers/ghc/8.10.7.nix | 2 +- pkgs/development/compilers/ghc/8.8.4.nix | 2 +- pkgs/development/compilers/ghc/9.0.2.nix | 2 +- pkgs/development/compilers/ghc/9.2.3.nix | 2 +- pkgs/development/compilers/ghc/head.nix | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/compilers/ghc/8.10.7.nix b/pkgs/development/compilers/ghc/8.10.7.nix index 7a56d7c0e5c8..981dfee88b86 100644 --- a/pkgs/development/compilers/ghc/8.10.7.nix +++ b/pkgs/development/compilers/ghc/8.10.7.nix @@ -234,7 +234,7 @@ stdenv.mkDerivation (rec { # GHC is a bit confused on its cross terminology, as these would normally be # the *host* tools. export CC="${targetCC}/bin/${targetCC.targetPrefix}cc" - export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx" + export CXX="${targetCC}/bin/${targetCC.targetPrefix}c++" # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177 export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${lib.optionalString useLdGold ".gold"}" export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as" diff --git a/pkgs/development/compilers/ghc/8.8.4.nix b/pkgs/development/compilers/ghc/8.8.4.nix index 907d995a250a..40dabc6c9837 100644 --- a/pkgs/development/compilers/ghc/8.8.4.nix +++ b/pkgs/development/compilers/ghc/8.8.4.nix @@ -215,7 +215,7 @@ stdenv.mkDerivation (rec { # GHC is a bit confused on its cross terminology, as these would normally be # the *host* tools. export CC="${targetCC}/bin/${targetCC.targetPrefix}cc" - export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx" + export CXX="${targetCC}/bin/${targetCC.targetPrefix}c++" # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177 export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${lib.optionalString useLdGold ".gold"}" export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as" diff --git a/pkgs/development/compilers/ghc/9.0.2.nix b/pkgs/development/compilers/ghc/9.0.2.nix index 6de0f201599f..7b3f213ed333 100644 --- a/pkgs/development/compilers/ghc/9.0.2.nix +++ b/pkgs/development/compilers/ghc/9.0.2.nix @@ -217,7 +217,7 @@ stdenv.mkDerivation (rec { # GHC is a bit confused on its cross terminology, as these would normally be # the *host* tools. export CC="${targetCC}/bin/${targetCC.targetPrefix}cc" - export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx" + export CXX="${targetCC}/bin/${targetCC.targetPrefix}c++" # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177 export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${lib.optionalString useLdGold ".gold"}" export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as" diff --git a/pkgs/development/compilers/ghc/9.2.3.nix b/pkgs/development/compilers/ghc/9.2.3.nix index af641ae9c59a..016b7df90ce1 100644 --- a/pkgs/development/compilers/ghc/9.2.3.nix +++ b/pkgs/development/compilers/ghc/9.2.3.nix @@ -199,7 +199,7 @@ stdenv.mkDerivation (rec { # GHC is a bit confused on its cross terminology, as these would normally be # the *host* tools. export CC="${targetCC}/bin/${targetCC.targetPrefix}cc" - export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx" + export CXX="${targetCC}/bin/${targetCC.targetPrefix}c++" # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177 export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${lib.optionalString useLdGold ".gold"}" export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as" diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index 4f52ba0a6182..ea7c47959a19 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -205,7 +205,7 @@ stdenv.mkDerivation (rec { # GHC is a bit confused on its cross terminology, as these would normally be # the *host* tools. export CC="${targetCC}/bin/${targetCC.targetPrefix}cc" - export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx" + export CXX="${targetCC}/bin/${targetCC.targetPrefix}c++" # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177 # and more generally have a faster linker. export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${lib.optionalString useLdGold ".gold"}"