* Use GCC 4.3 by default.

* Updated stdenv-linux:

  - The bootstrap tools are no longer statically linked (except for
    binaries in the Nixpkgs tree used to download and unpack the
    bootstrap tools).

  - x86_64 uses the same static binaries as i686.  This makes the
    Nixpkgs tree a bit smaller.

  - Use the Linux 2.6.28 headers.

svn path=/nixpkgs/branches/stdenv-updates/; revision=13946
This commit is contained in:
Eelco Dolstra
2009-02-01 21:44:56 +00:00
parent 9f3a83f247
commit 779b4b2448
24 changed files with 177 additions and 194 deletions

View File

@@ -1,7 +0,0 @@
set -e
PATH=$staticTools/bin
mkdir $out
sed -e "s^@initialPath@^$staticTools^" -e "s^@preHook@^^" -e "s^@postHook@^^" -e "s^@shell@^$SHELL^" < $stdenvScript > $out/setup

View File

@@ -1,3 +1,8 @@
set -e
$ln -s $curl curl.bz2
$bzip2 -d -f curl.bz2
./curl --version
echo "downloading $out from $url"
$curl/bin/curl --fail --location --max-redirs 20 "$url" > "$out"
./curl --fail --location --max-redirs 20 "$url" > "$out"

View File

@@ -1,8 +1,3 @@
export NIX_ENFORCE_PURITY=1
if test "$param1" = "static"; then
export NIX_CFLAGS_LINK="-static"
export NIX_LDFLAGS_BEFORE="-static"
fi
havePatchELF=1

View File

@@ -0,0 +1,35 @@
set -e
# Unpack the bootstrap tools tarball.
echo Unpacking the bootstrap tools...
$mkdir $out
$bzip2 -d < $tarball | (cd $out && $cpio -V -i)
# Set the ELF interpreter / RPATH in the bootstrap binaries.
echo Patching the bootstrap tools...
# On x86_64, ld-linux-x86-64.so.2 barfs on patchelf'ed programs. So
# use a copy of patchelf.
LD_LIBRARY_PATH=$out/lib $out/lib/ld-linux*.so.2 $out/bin/cp $out/bin/patchelf .
for i in $out/bin/* $out/libexec/gcc/*/*/*; do
echo patching $i
if ! test -L $i; then
LD_LIBRARY_PATH=$out/lib $out/lib/ld-linux*.so.2 \
./patchelf --set-interpreter $out/lib/ld-linux*.so.2 --set-rpath $out/lib $i
fi
done
# Fix the libc linker script.
export PATH=$out/bin
cat $out/lib/libc.so | sed "s|/nix/store/e*-[^/]*/|$out/|g" > $out/lib/libc.so.tmp
mv $out/lib/libc.so.tmp $out/lib/libc.so
# Provide some additional symlinks.
ln -s bash $out/bin/sh
ln -s bzip2 $out/bin/bunzip2
# fetchurl needs curl.
bzip2 -d < $curl > $out/bin/curl
chmod +x $out/bin/curl

View File

@@ -1,11 +0,0 @@
set -x
set -e
# Tricky: need to make $out/bin without mkdir ;-). So use cp to copy
# the current (empty) directory.
$cp -prvd . $out
$cp -prvd . $out/bin
$cp $curl curl.bz2
$bzip2 -d curl.bz2
$cp curl $out/bin

View File

@@ -1,8 +0,0 @@
set -e
$cp $tar .tar.bz2
$bzip2 -d .tar.bz2
$bzip2 -d < $tarball | ./.tar xvf -
$cp -prd * $out