misc: Remove almost all uses of stdenv.{ccCross,binutils}

This commit is contained in:
John Ericson 2017-05-30 20:17:10 -04:00 committed by John Ericson
parent d016637629
commit 12795a7068
9 changed files with 14 additions and 16 deletions

View File

@ -370,7 +370,6 @@ stdenv.mkDerivation {
crossAttrs = { crossAttrs = {
shell = shell.crossDrv + shell.crossDrv.shellPath; shell = shell.crossDrv + shell.crossDrv.shellPath;
libc = stdenv.ccCross.libc;
}; };
meta = meta =

View File

@ -61,7 +61,6 @@ stdenv.mkDerivation {
crossAttrs = { crossAttrs = {
shell = shell.crossDrv + shell.crossDrv.shellPath; shell = shell.crossDrv + shell.crossDrv.shellPath;
libc = stdenv.ccCross.libc;
coreutils = coreutils.crossDrv; coreutils = coreutils.crossDrv;
binutils = binutils.crossDrv; binutils = binutils.crossDrv;
gcc = gcc.crossDrv; gcc = gcc.crossDrv;

View File

@ -283,7 +283,7 @@ stdenv.mkDerivation ({
NM_FOR_TARGET = "${targetPlatform.config}-nm"; NM_FOR_TARGET = "${targetPlatform.config}-nm";
CXX_FOR_TARGET = "${targetPlatform.config}-g++"; CXX_FOR_TARGET = "${targetPlatform.config}-g++";
# If we are making a cross compiler, cross != null # 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; dontStrip = true;
configureFlags = '' configureFlags = ''
${if enableMultilib then "" else "--disable-multilib"} ${if enableMultilib then "" else "--disable-multilib"}

View File

@ -401,7 +401,7 @@ stdenv.mkDerivation ({
NM_FOR_TARGET = "${targetPlatform.config}-nm"; NM_FOR_TARGET = "${targetPlatform.config}-nm";
CXX_FOR_TARGET = "${targetPlatform.config}-g++"; CXX_FOR_TARGET = "${targetPlatform.config}-g++";
# If we are making a cross compiler, cross != null # 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; dontStrip = true;
configureFlags = '' configureFlags = ''
${if enableMultilib then "" else "--disable-multilib"} ${if enableMultilib then "" else "--disable-multilib"}

View File

@ -407,7 +407,7 @@ stdenv.mkDerivation ({
NM_FOR_TARGET = "${targetPlatform.config}-nm"; NM_FOR_TARGET = "${targetPlatform.config}-nm";
CXX_FOR_TARGET = "${targetPlatform.config}-g++"; CXX_FOR_TARGET = "${targetPlatform.config}-g++";
# If we are making a cross compiler, cross != null # 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; dontStrip = true;
configureFlags = '' configureFlags = ''
${if enableMultilib then "" else "--disable-multilib"} ${if enableMultilib then "" else "--disable-multilib"}

View File

@ -422,7 +422,7 @@ stdenv.mkDerivation ({
NM_FOR_TARGET = "${targetPlatform.config}-nm"; NM_FOR_TARGET = "${targetPlatform.config}-nm";
CXX_FOR_TARGET = "${targetPlatform.config}-g++"; CXX_FOR_TARGET = "${targetPlatform.config}-g++";
# If we are making a cross compiler, cross != null # 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; dontStrip = true;
configureFlags = '' configureFlags = ''
${if enableMultilib then "" else "--disable-multilib"} ${if enableMultilib then "" else "--disable-multilib"}

View File

@ -404,7 +404,7 @@ stdenv.mkDerivation ({
NM_FOR_TARGET = "${targetPlatform.config}-nm"; NM_FOR_TARGET = "${targetPlatform.config}-nm";
CXX_FOR_TARGET = "${targetPlatform.config}-g++"; CXX_FOR_TARGET = "${targetPlatform.config}-g++";
# If we are making a cross compiler, cross != null # 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; dontStrip = true;
configureFlags = '' configureFlags = ''
${if enableMultilib then "" else "--disable-multilib"} ${if enableMultilib then "" else "--disable-multilib"}

View File

@ -405,7 +405,7 @@ stdenv.mkDerivation ({
NM_FOR_TARGET = "${targetPlatform.config}-nm"; NM_FOR_TARGET = "${targetPlatform.config}-nm";
CXX_FOR_TARGET = "${targetPlatform.config}-g++"; CXX_FOR_TARGET = "${targetPlatform.config}-g++";
# If we are making a cross compiler, cross != null # 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; dontStrip = true;
configureFlags = '' configureFlags = ''
${if enableMultilib then "" else "--disable-multilib"} ${if enableMultilib then "" else "--disable-multilib"}

View File

@ -101,26 +101,26 @@ in stdenv.mkDerivation (rec {
''; '';
configureFlags = [ configureFlags = [
"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"
"AR=${stdenv.binutils}/bin/${cross.config}-ar" "AR=${stdenv.cc}/bin/${cross.config}-ar"
"NM=${stdenv.binutils}/bin/${cross.config}-nm" "NM=${stdenv.cc}/bin/${cross.config}-nm"
"RANLIB=${stdenv.binutils}/bin/${cross.config}-ranlib" "RANLIB=${stdenv.cc}/bin/${cross.config}-ranlib"
"--target=${cross.config}" "--target=${cross.config}"
"--enable-bootstrap-with-devel-snapshot" "--enable-bootstrap-with-devel-snapshot"
] ++ ] ++
# fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/ # 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"; lib.optional (cross.config or null == "aarch64-apple-darwin14") "--disable-large-address-space";
buildInputs = commonBuildInputs ++ [ stdenv.ccCross stdenv.binutils ]; buildInputs = commonBuildInputs;
configurePlatforms = []; configurePlatforms = [];
passthru = { passthru = {
inherit bootPkgs cross; 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";
}; };
}) })