* Merged the stdenv branch
(https://svn.nixos.org/repos/nix/nixpkgs/branches/stdenv-updates -r10966:12061). svn path=/nixpkgs/trunk/; revision=12073
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
# compiler and linker that do not search in default locations,
|
||||
# ensuring purity of components produced by it.
|
||||
|
||||
{system, allPackages}:
|
||||
# The function defaults are for easy testing.
|
||||
{system ? "i686-linux", allPackages ? import ../../top-level/all-packages.nix}:
|
||||
|
||||
rec {
|
||||
|
||||
@@ -98,7 +99,7 @@ rec {
|
||||
# This function builds the various standard environments used during
|
||||
# the bootstrap.
|
||||
stdenvBootFun =
|
||||
{gcc, staticGlibc, extraAttrs ? {}}:
|
||||
{gcc, staticGlibc, extraAttrs ? {}, extraPath ? []}:
|
||||
|
||||
let
|
||||
fetchurlBoot = import ../../build-support/fetchurl {
|
||||
@@ -111,9 +112,7 @@ rec {
|
||||
preHook = ./scripts/prehook.sh;
|
||||
stdenv = stdenvInitial;
|
||||
shell = bootstrapTools.bash;
|
||||
initialPath = [
|
||||
staticTools
|
||||
];
|
||||
initialPath = [staticTools] ++ extraPath;
|
||||
inherit fetchurlBoot;
|
||||
extraAttrs = extraAttrs // {fetchurl = fetchurlBoot;};
|
||||
inherit gcc;
|
||||
@@ -159,6 +158,14 @@ rec {
|
||||
bootStdenv = stdenvLinuxBoot2;
|
||||
};
|
||||
|
||||
|
||||
# Ugh, some packages in stdenvLinuxBoot3Pkgs need "sh", so create a
|
||||
# package that contains just a symlink to bash.
|
||||
shSymlink = stdenvLinuxBoot2Pkgs.runCommand "sh-symlink" {} ''
|
||||
ensureDir $out/bin
|
||||
ln -s $shell $out/bin/sh
|
||||
'';
|
||||
|
||||
|
||||
# 6) Construct a third stdenv identical to the second, except that
|
||||
# this one uses the dynamically linked GCC and Binutils from step
|
||||
@@ -170,6 +177,7 @@ rec {
|
||||
libc = stdenvLinuxGlibc;
|
||||
gcc = stdenvLinuxBoot2Pkgs.gcc.gcc;
|
||||
};
|
||||
extraPath = [stdenvLinuxBoot2Pkgs.replace shSymlink];
|
||||
};
|
||||
|
||||
|
||||
@@ -183,7 +191,7 @@ rec {
|
||||
# 8) Construct the final stdenv. It uses the Glibc, GCC and
|
||||
# Binutils built above, and adds in dynamically linked versions
|
||||
# of all other tools.
|
||||
stdenvLinux = (import ../generic) {
|
||||
stdenvLinux = import ../generic {
|
||||
name = "stdenv-linux";
|
||||
preHook = ./scripts/prehook.sh;
|
||||
initialPath = [
|
||||
@@ -208,7 +216,8 @@ rec {
|
||||
inherit (stdenvLinuxBoot2Pkgs) binutils /* gcc */ glibc;
|
||||
inherit (stdenvLinuxBoot3Pkgs)
|
||||
gzip bzip2 bash coreutils diffutils findutils gawk
|
||||
gnumake gnused gnutar gnugrep patch patchelf;
|
||||
gnumake gnused gnutar gnugrep patch patchelf
|
||||
attr acl;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -102,10 +102,10 @@ rm -rf gcc/lib/gcc/*/*/include/root
|
||||
rm -rf gcc/lib/gcc/*/*/include/linux
|
||||
if test "$system" = "powerpc-linux"; then
|
||||
nukeRefs gcc/lib/gcc/powerpc-unknown-linux-gnu/*/include/bits/mathdef.h
|
||||
# Dangling symlink "sound", probably produced by fixinclude.
|
||||
# Should investigate why it's there in the first place.
|
||||
rm -f gcc/lib/gcc/powerpc-unknown-linux-gnu/*/include/sound
|
||||
fi
|
||||
# Dangling symlink "sound", probably produced by fixinclude.
|
||||
# Should investigate why it's there in the first place.
|
||||
rm -f gcc/lib/gcc/*/*/include/sound
|
||||
|
||||
|
||||
# Create the glibc tarball.
|
||||
@@ -130,10 +130,8 @@ for i in glibc/include/asm-*; do
|
||||
rm $i
|
||||
cp -prd $target glibc/include
|
||||
done
|
||||
if test "$system" = "powerpc-linux"; then
|
||||
# Hopefully we won't need these.
|
||||
rm -f glibc/include/mtd glibc/include/rdma glibc/include/sound glibc/include/video
|
||||
fi
|
||||
# Hopefully we won't need these.
|
||||
rm -f glibc/include/mtd glibc/include/rdma glibc/include/sound glibc/include/video
|
||||
|
||||
|
||||
# Strip executables even further.
|
||||
|
||||
Reference in New Issue
Block a user