Merge branch 'master' into gcc-7
This commit is contained in:
@@ -47,7 +47,7 @@ let
|
||||
# the bootstrap. In all stages, we build an stdenv and the package
|
||||
# set that can be built with that stdenv.
|
||||
stageFun = prevStage:
|
||||
{ name, overrides ? (self: super: {}), extraBuildInputs ? [] }:
|
||||
{ name, overrides ? (self: super: {}), extraNativeBuildInputs ? [] }:
|
||||
|
||||
let
|
||||
|
||||
@@ -56,7 +56,7 @@ let
|
||||
buildPlatform = localSystem;
|
||||
hostPlatform = localSystem;
|
||||
targetPlatform = localSystem;
|
||||
inherit config extraBuildInputs;
|
||||
inherit config extraNativeBuildInputs;
|
||||
preHook =
|
||||
''
|
||||
# Don't patch #!/interpreter because it leads to retained
|
||||
@@ -79,8 +79,6 @@ let
|
||||
buildPackages = lib.optionalAttrs (prevStage ? stdenv) {
|
||||
inherit (prevStage) stdenv;
|
||||
};
|
||||
hostPlatform = localSystem;
|
||||
targetPlatform = localSystem;
|
||||
cc = prevStage.gcc-unwrapped;
|
||||
isGNU = true;
|
||||
libc = prevStage.glibc;
|
||||
@@ -219,9 +217,9 @@ in
|
||||
isl = isl_0_17;
|
||||
};
|
||||
};
|
||||
extraBuildInputs = [ prevStage.patchelf prevStage.paxctl ] ++
|
||||
extraNativeBuildInputs = [ prevStage.patchelf prevStage.paxctl ] ++
|
||||
# Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
|
||||
lib.optional (system == "aarch64-linux") prevStage.updateAutotoolsGnuConfigScriptsHook;
|
||||
lib.optional localSystem.isAarch64 prevStage.updateAutotoolsGnuConfigScriptsHook;
|
||||
})
|
||||
|
||||
|
||||
@@ -244,8 +242,6 @@ in
|
||||
buildPackages = {
|
||||
inherit (prevStage) stdenv;
|
||||
};
|
||||
hostPlatform = localSystem;
|
||||
targetPlatform = localSystem;
|
||||
cc = prevStage.gcc-unwrapped;
|
||||
libc = self.glibc;
|
||||
inherit (self) stdenv binutils coreutils gnugrep;
|
||||
@@ -253,9 +249,9 @@ in
|
||||
shell = self.bash + "/bin/bash";
|
||||
};
|
||||
};
|
||||
extraBuildInputs = [ prevStage.patchelf prevStage.xz ] ++
|
||||
extraNativeBuildInputs = [ prevStage.patchelf prevStage.xz ] ++
|
||||
# Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
|
||||
lib.optional (system == "aarch64-linux") prevStage.updateAutotoolsGnuConfigScriptsHook;
|
||||
lib.optional localSystem.isAarch64 prevStage.updateAutotoolsGnuConfigScriptsHook;
|
||||
})
|
||||
|
||||
# Construct the final stdenv. It uses the Glibc and GCC, and adds
|
||||
@@ -283,9 +279,9 @@ in
|
||||
initialPath =
|
||||
((import ../common-path.nix) {pkgs = prevStage;});
|
||||
|
||||
extraBuildInputs = [ prevStage.patchelf prevStage.paxctl ] ++
|
||||
extraNativeBuildInputs = [ prevStage.patchelf prevStage.paxctl ] ++
|
||||
# Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
|
||||
lib.optional (system == "aarch64-linux") prevStage.updateAutotoolsGnuConfigScriptsHook;
|
||||
lib.optional localSystem.isAarch64 prevStage.updateAutotoolsGnuConfigScriptsHook;
|
||||
|
||||
cc = prevStage.gcc;
|
||||
|
||||
@@ -299,13 +295,25 @@ in
|
||||
shellPackage = prevStage.bash;
|
||||
};
|
||||
|
||||
/* outputs TODO
|
||||
allowedRequisites = with prevStage;
|
||||
[ gzip bzip2 xz bash binutils coreutils diffutils findutils gawk
|
||||
glibc gnumake gnused gnutar gnugrep gnupatch patchelf attr acl
|
||||
paxctl zlib pcre linuxHeaders ed gcc gcc.cc libsigsegv
|
||||
] ++ lib.optional (system == "aarch64-linux") prevStage.updateAutotoolsGnuConfigScriptsHook;
|
||||
*/
|
||||
# Mainly avoid reference to bootstrap tools
|
||||
allowedRequisites = with prevStage; with lib;
|
||||
# Simple executable tools
|
||||
concatMap (p: [ (getBin p) (getLib p) ])
|
||||
[ gzip bzip2 xz bash binutils coreutils diffutils findutils gawk
|
||||
gnumake gnused gnutar gnugrep gnupatch patchelf ed paxctl
|
||||
]
|
||||
# Library dependencies
|
||||
++ map getLib (
|
||||
[ attr acl zlib pcre ]
|
||||
++ lib.optional (gawk.libsigsegv != null) gawk.libsigsegv
|
||||
)
|
||||
# More complicated cases
|
||||
++ [
|
||||
glibc.out glibc.dev glibc.bin/*propagated from .dev*/ linuxHeaders
|
||||
gcc gcc.cc gcc.cc.lib gcc.expand-response-params
|
||||
]
|
||||
++ lib.optionals localSystem.isAarch64
|
||||
[ prevStage.updateAutotoolsGnuConfigScriptsHook prevStage.gnu-config ];
|
||||
|
||||
overrides = self: super: {
|
||||
inherit (prevStage)
|
||||
|
||||
Reference in New Issue
Block a user