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 = {
shell = shell.crossDrv + shell.crossDrv.shellPath;
libc = stdenv.ccCross.libc;
};
meta =

View File

@ -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;

View File

@ -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"}

View File

@ -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"}

View File

@ -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"}

View File

@ -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"}

View File

@ -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"}

View File

@ -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"}

View File

@ -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";
};
})