Trying to add the fuloong2f for bootstrap-files. It bootstraps fine

(boostrap-files cross-built)

svn path=/nixpkgs/branches/stdenv-updates/; revision=22849
This commit is contained in:
Lluís Batlle i Rossell 2010-08-01 21:22:51 +00:00
parent da3ba13fb5
commit 40405d03ac
11 changed files with 36 additions and 10 deletions

View file

@ -67,6 +67,7 @@ stdenv.mkDerivation {
if stdenv.system == "x86_64-linux" then "ld-linux-x86-64.so.2" else
if stdenv.system == "armv5tel-linux" then "ld-linux.so.3" else
if stdenv.system == "powerpc-linux" then "ld.so.1" else
if stdenv.system == "ict_loongson-2_v0.3_fpu_v0.1-linux" then "ld.so.1" else
abort "don't know the name of the dynamic linker for this platform")
else "";
}

View file

@ -55,6 +55,7 @@ rec {
if stdenvType == "i686-linux" then stdenvLinux else
if stdenvType == "x86_64-linux" then stdenvLinux else
if stdenvType == "armv5tel-linux" then stdenvLinux else
if stdenvType == "ict_loongson-2_v0.3_fpu_v0.1-linux" then stdenvLinux else
if stdenvType == "powerpc-linux" then /* stdenvLinux */ stdenvNative else
if stdenvType == "i686-mingw" then stdenvMinGW else
if stdenvType == "i686-darwin" then stdenvNix else

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,13 @@
{
sh = ./sh;
bzip2 = ./bzip2;
mkdir = ./mkdir;
cpio = ./cpio;
ln = ./ln;
curl = ./curl.bz2;
bootstrapTools = {
url = "file:///root/cross-bootstrap-tools.cpio.bz2";
sha256 = "00aavbk76qjj2gdlmpaaj66r8nzl4d7pyl8cv1gigyzgpbr5vv3j";
};
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -14,6 +14,7 @@ rec {
else if system == "x86_64-linux" then import ./bootstrap/x86_64
else if system == "powerpc-linux" then import ./bootstrap/powerpc
else if system == "armv5tel-linux" then import ./bootstrap/armv5tel
else if system == "ict_loongson-2_v0.3_fpu_v0.1-linux" then import ./bootstrap/loongson2f
else abort "unsupported platform for the pure Linux stdenv";

View file

@ -3,31 +3,41 @@ set -e
# Unpack the bootstrap tools tarball.
echo Unpacking the bootstrap tools...
$mkdir $out
$bzip2 -d < $tarball | (cd $out && $cpio -V -i)
$bzip2 -d < $tarball | (cd $out && $cpio -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.? $out/bin/cp $out/bin/patchelf .
LD_LIBRARY_PATH=$out/lib $out/lib/ld.so.? $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.? \
$out/bin/patchelf --set-interpreter $out/lib/ld-linux*.so.? --set-rpath $out/lib --force-rpath $i
LD_LIBRARY_PATH=$out/lib $out/lib/ld-linux*.so.? \
$out/bin/patchelf --set-interpreter $out/lib/ld-linux*.so.? --set-rpath $out/lib --force-rpath $i
LD_LIBRARY_PATH=$out/lib $out/lib/ld.so.? \
$out/bin/patchelf --set-interpreter $out/lib/ld.so.? --set-rpath $out/lib --force-rpath $i
LD_LIBRARY_PATH=$out/lib $out/lib/ld.so.? \
$out/bin/patchelf --set-interpreter $out/lib/ld.so.? --set-rpath $out/lib --force-rpath $i
fi
done
for i in $out/lib/librt* ; do
echo patching $i
if ! test -L $i; then
LD_LIBRARY_PATH=$out/lib $out/lib/ld-linux*.so.? \
$out/bin/patchelf --set-interpreter $out/lib/ld-linux*.so.? --set-rpath $out/lib --force-rpath $i
LD_LIBRARY_PATH=$out/lib $out/lib/ld-linux*.so.? \
$out/bin/patchelf --set-interpreter $out/lib/ld-linux*.so.? --set-rpath $out/lib --force-rpath $i
LD_LIBRARY_PATH=$out/lib $out/lib/ld.so.? \
$out/bin/patchelf --set-interpreter $out/lib/ld.so.? --set-rpath $out/lib --force-rpath $i
LD_LIBRARY_PATH=$out/lib $out/lib/ld.so.? \
$out/bin/patchelf --set-interpreter $out/lib/ld.so.? --set-rpath $out/lib --force-rpath $i
fi
done
for i in $out/lib/libgmp* $out/lib/libppl* $out/lib/libcloog* $out/lib/libmpc*; do
echo patching $i
if test -f $i -a ! -L $i; then
LD_LIBRARY_PATH=$out/lib $out/lib/ld.so.? \
$out/bin/patchelf --set-rpath $out/lib --force-rpath $i
LD_LIBRARY_PATH=$out/lib $out/lib/ld.so.? \
$out/bin/patchelf --set-rpath $out/lib --force-rpath $i
fi
done