mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
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:
parent
da3ba13fb5
commit
40405d03ac
@ -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 "";
|
||||
}
|
||||
|
@ -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
|
||||
|
BIN
pkgs/stdenv/linux/bootstrap/loongson2f/bzip2
Executable file
BIN
pkgs/stdenv/linux/bootstrap/loongson2f/bzip2
Executable file
Binary file not shown.
BIN
pkgs/stdenv/linux/bootstrap/loongson2f/cpio
Executable file
BIN
pkgs/stdenv/linux/bootstrap/loongson2f/cpio
Executable file
Binary file not shown.
BIN
pkgs/stdenv/linux/bootstrap/loongson2f/curl.bz2
Executable file
BIN
pkgs/stdenv/linux/bootstrap/loongson2f/curl.bz2
Executable file
Binary file not shown.
13
pkgs/stdenv/linux/bootstrap/loongson2f/default.nix
Normal file
13
pkgs/stdenv/linux/bootstrap/loongson2f/default.nix
Normal 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";
|
||||
};
|
||||
}
|
BIN
pkgs/stdenv/linux/bootstrap/loongson2f/ln
Executable file
BIN
pkgs/stdenv/linux/bootstrap/loongson2f/ln
Executable file
Binary file not shown.
BIN
pkgs/stdenv/linux/bootstrap/loongson2f/mkdir
Executable file
BIN
pkgs/stdenv/linux/bootstrap/loongson2f/mkdir
Executable file
Binary file not shown.
BIN
pkgs/stdenv/linux/bootstrap/loongson2f/sh
Executable file
BIN
pkgs/stdenv/linux/bootstrap/loongson2f/sh
Executable file
Binary file not shown.
@ -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";
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user