mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-19 02:44:17 +03:00
misc: Remove almost all uses of stdenv.{ccCross,binutils}
This commit is contained in:
parent
d016637629
commit
12795a7068
@ -370,7 +370,6 @@ stdenv.mkDerivation {
|
||||
|
||||
crossAttrs = {
|
||||
shell = shell.crossDrv + shell.crossDrv.shellPath;
|
||||
libc = stdenv.ccCross.libc;
|
||||
};
|
||||
|
||||
meta =
|
||||
|
@ -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;
|
||||
|
@ -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"}
|
||||
|
@ -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"}
|
||||
|
@ -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"}
|
||||
|
@ -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"}
|
||||
|
@ -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"}
|
||||
|
@ -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"}
|
||||
|
@ -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";
|
||||
};
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user