diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 35a5e90583b8..0c624a1454a3 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -370,7 +370,6 @@ stdenv.mkDerivation { crossAttrs = { shell = shell.crossDrv + shell.crossDrv.shellPath; - libc = stdenv.ccCross.libc; }; meta = diff --git a/pkgs/build-support/gcc-wrapper-old/default.nix b/pkgs/build-support/gcc-wrapper-old/default.nix index a87c726e0a8b..f8a7c62edc73 100644 --- a/pkgs/build-support/gcc-wrapper-old/default.nix +++ b/pkgs/build-support/gcc-wrapper-old/default.nix @@ -61,7 +61,6 @@ stdenv.mkDerivation { crossAttrs = { shell = shell.crossDrv + shell.crossDrv.shellPath; - libc = stdenv.ccCross.libc; coreutils = coreutils.crossDrv; binutils = binutils.crossDrv; gcc = gcc.crossDrv; diff --git a/pkgs/development/compilers/gcc/4.5/default.nix b/pkgs/development/compilers/gcc/4.5/default.nix index 67981ad1056e..69197b923c38 100644 --- a/pkgs/development/compilers/gcc/4.5/default.nix +++ b/pkgs/development/compilers/gcc/4.5/default.nix @@ -283,7 +283,7 @@ stdenv.mkDerivation ({ NM_FOR_TARGET = "${targetPlatform.config}-nm"; CXX_FOR_TARGET = "${targetPlatform.config}-g++"; # If we are making a cross compiler, cross != null - NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else ""; + NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; dontStrip = true; configureFlags = '' ${if enableMultilib then "" else "--disable-multilib"} diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index de9d3165b55e..38ff23f86a6d 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -401,7 +401,7 @@ stdenv.mkDerivation ({ NM_FOR_TARGET = "${targetPlatform.config}-nm"; CXX_FOR_TARGET = "${targetPlatform.config}-g++"; # If we are making a cross compiler, cross != null - NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else ""; + NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; dontStrip = true; configureFlags = '' ${if enableMultilib then "" else "--disable-multilib"} diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index c5bebdf33003..04e67e44f773 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -407,7 +407,7 @@ stdenv.mkDerivation ({ NM_FOR_TARGET = "${targetPlatform.config}-nm"; CXX_FOR_TARGET = "${targetPlatform.config}-g++"; # If we are making a cross compiler, cross != null - NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else ""; + NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; dontStrip = true; configureFlags = '' ${if enableMultilib then "" else "--disable-multilib"} diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index b4a74300d366..d4692c777514 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -422,7 +422,7 @@ stdenv.mkDerivation ({ NM_FOR_TARGET = "${targetPlatform.config}-nm"; CXX_FOR_TARGET = "${targetPlatform.config}-g++"; # If we are making a cross compiler, cross != null - NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else ""; + NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; dontStrip = true; configureFlags = '' ${if enableMultilib then "" else "--disable-multilib"} diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index 057acf9794e7..c439703fa8e4 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -404,7 +404,7 @@ stdenv.mkDerivation ({ NM_FOR_TARGET = "${targetPlatform.config}-nm"; CXX_FOR_TARGET = "${targetPlatform.config}-g++"; # If we are making a cross compiler, cross != null - NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else ""; + NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; dontStrip = true; configureFlags = '' ${if enableMultilib then "" else "--disable-multilib"} diff --git a/pkgs/development/compilers/gcc/snapshot/default.nix b/pkgs/development/compilers/gcc/snapshot/default.nix index bb2c9d8a5c09..f3d8d27d90c6 100644 --- a/pkgs/development/compilers/gcc/snapshot/default.nix +++ b/pkgs/development/compilers/gcc/snapshot/default.nix @@ -405,7 +405,7 @@ stdenv.mkDerivation ({ NM_FOR_TARGET = "${targetPlatform.config}-nm"; CXX_FOR_TARGET = "${targetPlatform.config}-g++"; # If we are making a cross compiler, cross != null - NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else ""; + NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; dontStrip = true; configureFlags = '' ${if enableMultilib then "" else "--disable-multilib"} diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index 70200b2fa01b..f199048353c0 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -101,26 +101,26 @@ in stdenv.mkDerivation (rec { ''; configureFlags = [ - "CC=${stdenv.ccCross}/bin/${cross.config}-cc" - "LD=${stdenv.binutils}/bin/${cross.config}-ld" - "AR=${stdenv.binutils}/bin/${cross.config}-ar" - "NM=${stdenv.binutils}/bin/${cross.config}-nm" - "RANLIB=${stdenv.binutils}/bin/${cross.config}-ranlib" + "CC=${stdenv.cc}/bin/${cross.config}-cc" + "LD=${stdenv.cc}/bin/${cross.config}-ld" + "AR=${stdenv.cc}/bin/${cross.config}-ar" + "NM=${stdenv.cc}/bin/${cross.config}-nm" + "RANLIB=${stdenv.cc}/bin/${cross.config}-ranlib" "--target=${cross.config}" "--enable-bootstrap-with-devel-snapshot" ] ++ # fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/ lib.optional (cross.config or null == "aarch64-apple-darwin14") "--disable-large-address-space"; - buildInputs = commonBuildInputs ++ [ stdenv.ccCross stdenv.binutils ]; + buildInputs = commonBuildInputs; configurePlatforms = []; passthru = { inherit bootPkgs cross; - cc = "${stdenv.ccCross}/bin/${cross.config}-cc"; + cc = "${stdenv.cc}/bin/${cross.config}-cc"; - ld = "${stdenv.binutils}/bin/${cross.config}-ld"; + ld = "${stdenv.cc}/bin/${cross.config}-ld"; }; })