* Add the statically linked GCC.

svn path=/nixpkgs/trunk/; revision=6785
This commit is contained in:
Eelco Dolstra 2006-10-20 11:16:15 +00:00
parent 63720cf493
commit 263e4dd623
2 changed files with 28 additions and 2 deletions

View File

@ -7,14 +7,22 @@ let
# stdenv-linux's dependencies, rather than building new ones with
# dietlibc.
bootStdenv = removeAttrs (pkgs.useDietLibC pkgs.stdenv)
["binutils" "coreutils" "gnused" "gnugrep" "gnutar" "gzip" "bzip2" "bash" "patch" "patchelf"];
["binutils" "gcc" "coreutils" "gnused" "gnugrep" "gnutar" "gzip" "bzip2" "bash" "patch" "patchelf"];
};
generator = pkgs.stdenv.mkDerivation {
name = "bootstrap-tools-generator";
builder = ./make-bootstrap-tools.sh;
inherit (pkgsDiet) coreutils gnused gnugrep gnutar gzip bzip2 bash patch;
binutils = pkgsDiet.binutils;
gcc = import ../../development/compilers/gcc-static-4.1 {
inherit (pkgs) fetchurl stdenv;
profiledCompiler = false;
langCC = false;
};
curl = pkgsDiet.realCurl;
# The result should not contain any references (store paths) so

View File

@ -60,8 +60,25 @@ for i in as ld ar ranlib nm strip; do
done
# Create the gcc tarball
mkdir gcc
mkdir gcc/bin
cp $gcc/bin/gcc gcc/bin
cp $gcc/bin/cpp gcc/bin
nukeRefs gcc/bin/gcc
nukeRefs gcc/bin/cpp
cp -prd $gcc/lib gcc
cp -prd $gcc/libexec gcc
chmod -R +w gcc
nukeRefs gcc/libexec/gcc/*/*/cc1
nukeRefs gcc/libexec/gcc/*/*/collect2
rm gcc/lib/libmud* gcc/lib/libiberty* gcc/lib/libssp*
rm gcc/lib/*.so*
rm -rf gcc/lib/gcc/*/*/install-tools
# Strip executables even further.
for i in $out/in-nixpkgs/* */bin/*; do
for i in $out/in-nixpkgs/* */bin/* gcc/libexec/gcc/*/*/*; do
if test -x $i; then
chmod +w $i
strip -s $i || true
@ -72,6 +89,7 @@ done
# Pack, unpack everything.
tar cfj $out/on-server/static-tools.tar.bz2 tools
tar cfj $out/on-server/binutils.tar.bz2 binutils
tar cfj $out/on-server/gcc.tar.bz2 gcc
for i in $out/on-server/*.tar.bz2; do
(cd $out/check-only && tar xfj $i)