Merge remote-tracking branch 'upstream/master' into gnu-config-arm

This commit is contained in:
John Ericson
2018-05-14 10:58:15 -04:00
4711 changed files with 136612 additions and 89151 deletions
@@ -26,7 +26,7 @@ for i in $out/bin/* $out/libexec/gcc/*/*/*; do
./patchelf --set-interpreter $LD_BINARY --set-rpath $out/lib --force-rpath "$i"
done
for i in $out/lib/libiconv*.so $out/lib/libpcre* $out/lib/libc.so; do
for i in $out/lib/libpcre* $out/lib/libc.so; do
if [ -L "$i" ]; then continue; fi
echo patching "$i"
$out/bin/patchelf --set-rpath $out/lib --force-rpath "$i"
+13 -12
View File
@@ -66,7 +66,7 @@ let
let
thisStdenv = import ../generic {
name = "stdenv-linux-boot";
name = "${name}-stdenv-linux";
buildPlatform = localSystem;
hostPlatform = localSystem;
targetPlatform = localSystem;
@@ -88,7 +88,9 @@ let
cc = if isNull prevStage.gcc-unwrapped
then null
else lib.makeOverridable (import ../../build-support/cc-wrapper) {
name = "${name}-gcc-wrapper";
nativeTools = false;
propagateDoc = false;
nativeLibc = false;
buildPackages = lib.optionalAttrs (prevStage ? stdenv) {
inherit (prevStage) stdenv;
@@ -98,7 +100,6 @@ let
isGNU = true;
libc = getLibc prevStage;
inherit (prevStage) coreutils gnugrep;
name = name;
stdenvNoCC = prevStage.ccWrapperStdenv;
};
@@ -138,7 +139,7 @@ in
# Build a dummy stdenv with no GCC or working fetchurl. This is
# because we need a stdenv to build the GCC wrapper and fetchurl.
(prevStage: stageFun prevStage {
name = null;
name = "bootstrap-stage0";
overrides = self: super: {
# We thread stage0's stdenv through under this name so downstream stages
@@ -152,7 +153,7 @@ in
# create a dummy Glibc here, which will be used in the stdenv of
# stage1.
${localSystem.libc} = self.stdenv.mkDerivation {
name = "bootstrap-${localSystem.libc}";
name = "bootstrap-stage0-${localSystem.libc}";
buildCommand = ''
mkdir -p $out
ln -s ${bootstrapTools}/lib $out/lib
@@ -164,13 +165,13 @@ in
};
gcc-unwrapped = bootstrapTools;
binutils = import ../../build-support/bintools-wrapper {
name = "bootstrap-stage0-binutils-wrapper";
nativeTools = false;
nativeLibc = false;
buildPackages = { };
libc = getLibc self;
inherit (self) stdenvNoCC coreutils gnugrep;
bintools = bootstrapTools;
name = "bootstrap-binutils-wrapper";
};
coreutils = bootstrapTools;
gnugrep = bootstrapTools;
@@ -189,7 +190,7 @@ in
# simply re-export those packages in the middle stage(s) using the
# overrides attribute and the inherit syntax.
(prevStage: stageFun prevStage {
name = "bootstrap-gcc-wrapper";
name = "bootstrap-stage1";
# Rebuild binutils to use from stage2 onwards.
overrides = self: super: {
@@ -213,7 +214,7 @@ in
# 2nd stdenv that contains our own rebuilt binutils and is used for
# compiling our own Glibc.
(prevStage: stageFun prevStage {
name = "bootstrap-gcc-wrapper";
name = "bootstrap-stage2";
overrides = self: super: {
inherit (prevStage)
@@ -234,7 +235,7 @@ in
# one uses the rebuilt Glibc from stage2. It still uses the recent
# binutils and rest of the bootstrap tools, including GCC.
(prevStage: stageFun prevStage {
name = "bootstrap-gcc-wrapper";
name = "bootstrap-stage3";
overrides = self: super: rec {
inherit (prevStage)
@@ -262,7 +263,7 @@ in
# Construct a fourth stdenv that uses the new GCC. But coreutils is
# still from the bootstrap tools.
(prevStage: stageFun prevStage {
name = "";
name = "bootstrap-stage4";
overrides = self: super: {
# Zlib has to be inherited and not rebuilt in this stage,
@@ -291,7 +292,6 @@ in
bintools = self.binutils;
libc = getLibc self;
inherit (self) stdenvNoCC coreutils gnugrep;
name = "";
shell = self.bash + "/bin/bash";
};
};
@@ -310,6 +310,8 @@ in
(prevStage: {
inherit config overlays;
stdenv = import ../generic rec {
name = "stdenv-linux";
buildPlatform = localSystem;
hostPlatform = localSystem;
targetPlatform = localSystem;
@@ -360,7 +362,6 @@ in
++ [ /*propagated from .dev*/ linuxHeaders
binutils gcc gcc.cc gcc.cc.lib gcc.expand-response-params
]
++ lib.optional (localSystem.libc == "musl") libiconv
++ lib.optionals (!localSystem.isx86)
[ prevStage.updateAutotoolsGnuConfigScriptsHook prevStage.gnu-config ];
@@ -372,7 +373,7 @@ in
${localSystem.libc} = getLibc prevStage;
} // lib.optionalAttrs (super.targetPlatform == localSystem) {
# Need to get rid of these when cross-compiling.
inherit (prevStage) binutils binutils-raw;
inherit (prevStage) binutils binutils-unwrapped;
gcc = cc;
};
};
+1 -3
View File
@@ -88,7 +88,7 @@ in with pkgs; rec {
'' else throw "unsupported libc for bootstrap tools")
+ ''
# Copy coreutils, bash, etc.
cp ${coreutilsMinimal.out}/bin/* $out/bin
cp -d ${coreutilsMinimal.out}/bin/* $out/bin
(cd $out/bin && rm vdir dir sha*sum pinky factor pathchk runcon shuf who whoami shred users)
cp ${bash.out}/bin/bash $out/bin
@@ -136,8 +136,6 @@ in with pkgs; rec {
cp -d ${libmpc.out}/lib/libmpc*.so* $out/lib
cp -d ${zlib.out}/lib/libz.so* $out/lib
cp -d ${libelf}/lib/libelf.so* $out/lib
'' + lib.optionalString (hostPlatform.libc == "musl") ''
cp -d ${libiconv.out}/lib/libiconv*.so* $out/lib
'' + lib.optionalString (hostPlatform != buildPlatform) ''
# These needed for cross but not native tools because the stdenv