Merge branch 'staging' into gcc-7

This commit is contained in:
Vladimír Čunát
2017-11-11 20:33:50 +01:00
3666 changed files with 70441 additions and 56174 deletions
-11
View File
@@ -88,20 +88,9 @@ rec {
# buildInputs should be built with the usual gcc-wrapper
# And the same for propagatedBuildInputs.
nativeDrv = stdenv.mkDerivation args;
# Temporary expression until the cross_renaming, to handle the
# case of pkgconfig given as buildInput, but to be used as
# nativeBuildInput.
hostAsNativeDrv = drv:
builtins.unsafeDiscardStringContext drv.nativeDrv.drvPath
== builtins.unsafeDiscardStringContext drv.crossDrv.drvPath;
buildInputsNotNull = stdenv.lib.filter
(drv: builtins.isAttrs drv && drv ? nativeDrv) buildInputs;
nativeInputsFromBuildInputs = stdenv.lib.filter hostAsNativeDrv buildInputsNotNull;
in
stdenv.mkDerivation (args // {
nativeBuildInputs = nativeBuildInputs
++ nativeInputsFromBuildInputs
++ stdenv.lib.optional selfNativeBuildInput nativeDrv
# without proper `file` command, libtool sometimes fails
# to recognize 64-bit DLLs
+19 -6
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
@@ -98,7 +100,18 @@ stageFuns: let
then args'
else allPackages ((builtins.removeAttrs args' ["selfBuild"]) // {
buildPackages = if args.selfBuild or true then null else prevStage;
__targetPackages = if args.selfBuild or true then null else nextStage;
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
+2 -2
View File
@@ -77,7 +77,7 @@ in rec {
cc = if isNull last then "/dev/null" else import ../../build-support/cc-wrapper {
inherit shell;
inherit (last) stdenv;
inherit (last) stdenvNoCC;
nativeTools = false;
nativeLibc = false;
@@ -324,7 +324,7 @@ in rec {
shell = "${pkgs.bash}/bin/bash";
cc = lib.callPackageWith {} ../../build-support/cc-wrapper {
inherit (pkgs) stdenv;
inherit (pkgs) stdenvNoCC;
inherit shell;
nativeTools = false;
nativeLibc = false;
+1 -1
View File
@@ -77,7 +77,7 @@ let inherit (localSystem) system; in
nativeTools = true;
nativePrefix = "/usr";
nativeLibc = true;
inherit (prevStage) stdenv;
stdenvNoCC = prevStage.stdenv;
cc = {
name = "clang-9.9.9";
cc = "/usr";
+14 -1
View File
@@ -81,7 +81,20 @@ let
setup = setupScript;
inherit preHook initialPath shell
# We pretty much never need rpaths on Darwin, since all library path references
# are absolute unless we go out of our way to make them relative (like with CF)
# TODO: This really wants to be in stdenv/darwin but we don't have hostPlatform
# there (yet?) so it goes here until then.
preHook = preHook+ lib.optionalString buildPlatform.isDarwin ''
export NIX_BUILD_DONT_SET_RPATH=1
'' + lib.optionalString hostPlatform.isDarwin ''
export NIX_DONT_SET_RPATH=1
export NIX_NO_SELF_RPATH=1
'' + lib.optionalString targetPlatform.isDarwin ''
export NIX_TARGET_DONT_SET_RPATH=1
'';
inherit initialPath shell
defaultNativeBuildInputs defaultBuildInputs;
}
// lib.optionalAttrs buildPlatform.isDarwin {
+7 -3
View File
@@ -1,6 +1,10 @@
set -eu
set -o pipefail
if (( "${NIX_DEBUG:-0}" >= 6 )); then
set -x
fi
: ${outputs:=out}
@@ -269,7 +273,7 @@ for i in $initialPath; do
addToSearchPath PATH "$i/bin"
done
if [ "${NIX_DEBUG:-}" = 1 ]; then
if (( "${NIX_DEBUG:-0}" >= 1 )); then
echo "initial path: $PATH"
fi
@@ -429,7 +433,7 @@ fi
PATH="${_PATH-}${_PATH:+${PATH:+:}}$PATH"
if [ "${NIX_DEBUG:-}" = 1 ]; then
if (( "${NIX_DEBUG:-0}" >= 1 )); then
echo "final path: $PATH"
fi
@@ -539,7 +543,7 @@ substituteAll() {
local -a args=()
for varName in $(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }'); do
if [ "${NIX_DEBUG:-}" = "1" ]; then
if (( "${NIX_DEBUG:-0}" >= 1 )); then
printf "@%s@ -> %q\n" "${varName}" "${!varName}"
fi
args+=("--subst-var" "$varName")
+2 -2
View File
@@ -84,7 +84,7 @@ let
libc = prevStage.glibc;
inherit (prevStage) binutils coreutils gnugrep;
name = name;
stdenv = prevStage.ccWrapperStdenv;
stdenvNoCC = prevStage.ccWrapperStdenv;
};
extraAttrs = {
@@ -244,7 +244,7 @@ in
};
cc = prevStage.gcc-unwrapped;
libc = self.glibc;
inherit (self) stdenv binutils coreutils gnugrep;
inherit (self) stdenvNoCC binutils coreutils gnugrep;
name = "";
shell = self.bash + "/bin/bash";
};
+2 -1
View File
@@ -117,6 +117,7 @@ in
cc = null;
fetchurl = null;
};
stdenvNoCC = stdenv;
cc = import ../../build-support/cc-wrapper {
name = "cc-native";
@@ -126,7 +127,7 @@ in
"i686-solaris" = "/usr/gnu";
"x86_64-solaris" = "/opt/local/gcc47";
}.${system} or "/usr";
inherit stdenv;
inherit stdenvNoCC;
};
fetchurl = import ../../build-support/fetchurl {
+5 -8
View File
@@ -1,5 +1,5 @@
{ lib
, crossSystem, config
, crossSystem, config, overlays
, bootStages
, ...
}:
@@ -7,9 +7,7 @@
assert crossSystem == null;
bootStages ++ [
(prevStage: let
inherit (prevStage) stdenv;
in {
(prevStage: {
inherit config overlays;
stdenv = import ../generic rec {
@@ -27,10 +25,9 @@ bootStages ++ [
cc = import ../../build-support/cc-wrapper {
nativeTools = false;
nativePrefix = stdenv.lib.optionalString hostPlatform.isSunOS "/usr";
nativePrefix = lib.optionalString hostPlatform.isSunOS "/usr";
nativeLibc = true;
inherit stdenv;
inherit (prevStage) binutils coreutils gnugrep;
inherit (prevStage) stdenvNoCC binutils coreutils gnugrep;
cc = prevStage.gcc.cc;
isGNU = true;
shell = prevStage.bash + "/bin/sh";
@@ -38,7 +35,7 @@ bootStages ++ [
shell = prevStage.bash + "/bin/sh";
fetchurlBoot = stdenv.fetchurlBoot;
fetchurlBoot = prevStage.stdenv.fetchurlBoot;
overrides = self: super: {
inherit cc;