treewide: Depend on targetPackages.stdenv.cc.bintools instead of binutils directly

One should do this when needed executables at run time. It is more
honest and cross-friendly than refering to binutils directly, if one
neeeds the default binary tools for the target platform, rather than
binutils in particular.
This commit is contained in:
John Ericson
2017-11-05 17:10:53 -05:00
parent 70d91badf5
commit 4d4f94cde4
17 changed files with 81 additions and 71 deletions
+18 -5
View File
@@ -47,13 +47,13 @@ stageFuns: let
same as
let
f_-1 = lnul;
f_-1 = lnul f_0;
f_0 = op f_-1 x_0 f_1;
f_1 = op f_0 x_1 f_2;
f_2 = op f_1 x_2 f_3;
...
f_n = op f_n-1 x_n f_n+1;
f_n+1 = rnul;
f_n+1 = rnul f_n;
in
f_0
*/
@@ -62,13 +62,15 @@ stageFuns: let
len = builtins.length list;
go = pred: n:
if n == len
then rnul
then rnul pred
else let
# Note the cycle -- call-by-need ensures finite fold.
cur = op pred (builtins.elemAt list n) succ;
succ = go cur (n + 1);
in cur;
in go lnul 0;
lapp = lnul cur;
cur = go lapp 0;
in cur;
# Take the list and disallow custom overrides in all but the final stage,
# and allow it in the final flag. Only defaults this boolean field if it
@@ -101,4 +103,15 @@ stageFuns: let
targetPackages = if args.selfBuild or true then null else nextStage;
});
in dfold folder {} {} withAllowCustomOverrides
# This is a hack for resolving cross-compiled compilers' run-time
# deps. (That is, compilers that are themselves cross-compiled, as
# opposed to used to cross-compile packages.)
postStage = buildPackages: {
__raw = true;
stdenv.cc =
if buildPackages.stdenv.cc.isClang or false
then buildPackages.clang
else buildPackages.gcc;
};
in dfold folder postStage (_: {}) withAllowCustomOverrides