From 12795a706852539b8a29c796caced6295e7af459 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Tue, 30 May 2017 20:17:10 -0400 Subject: misc: Remove almost all uses of stdenv.{ccCross,binutils} --- pkgs/development/compilers/gcc/4.5/default.nix | 2 +- pkgs/development/compilers/gcc/4.8/default.nix | 2 +- pkgs/development/compilers/gcc/4.9/default.nix | 2 +- pkgs/development/compilers/gcc/5/default.nix | 2 +- pkgs/development/compilers/gcc/6/default.nix | 2 +- pkgs/development/compilers/gcc/snapshot/default.nix | 2 +- pkgs/development/compilers/ghc/head.nix | 16 ++++++++-------- 7 files changed, 14 insertions(+), 14 deletions(-) (limited to 'pkgs/development') 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"; }; }) -- cgit 1.4.1