* Bootstrap tools: build on x86_64-linux.
* Removed Perl from the bootstrap tools. svn path=/nixpkgs/branches/stdenv-updates/; revision=13827
This commit is contained in:
parent
4274b92cda
commit
c91168a600
@ -13,7 +13,7 @@ rec {
|
|||||||
|
|
||||||
gcc = gcc43;
|
gcc = gcc43;
|
||||||
|
|
||||||
|
|
||||||
build =
|
build =
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
@ -69,8 +69,8 @@ rec {
|
|||||||
cp -d ${gcc.gcc}/bin/gcc $out/bin
|
cp -d ${gcc.gcc}/bin/gcc $out/bin
|
||||||
cp -d ${gcc.gcc}/bin/cpp $out/bin
|
cp -d ${gcc.gcc}/bin/cpp $out/bin
|
||||||
cp -d ${gcc.gcc}/bin/g++ $out/bin
|
cp -d ${gcc.gcc}/bin/g++ $out/bin
|
||||||
cp -d ${gcc.gcc}/lib/libgcc_s.so* $out/lib
|
cp -d ${gcc.gcc}/lib*/libgcc_s.so* $out/lib
|
||||||
cp -d ${gcc.gcc}/lib/libstdc++.so* $out/lib
|
cp -d ${gcc.gcc}/lib*/libstdc++.so* $out/lib
|
||||||
cp -rd ${gcc.gcc}/lib/gcc $out/lib
|
cp -rd ${gcc.gcc}/lib/gcc $out/lib
|
||||||
chmod -R u+w $out/lib
|
chmod -R u+w $out/lib
|
||||||
rm -f $out/lib/gcc/*/*/include*/linux
|
rm -f $out/lib/gcc/*/*/include*/linux
|
||||||
@ -89,9 +89,6 @@ rec {
|
|||||||
cp ${binutils}/bin/$i $out/bin
|
cp ${binutils}/bin/$i $out/bin
|
||||||
done
|
done
|
||||||
|
|
||||||
# Copy perl.
|
|
||||||
cp ${perl}/bin/perl $out/bin
|
|
||||||
|
|
||||||
chmod -R u+w $out
|
chmod -R u+w $out
|
||||||
|
|
||||||
# Strip executables even further.
|
# Strip executables even further.
|
||||||
@ -106,8 +103,7 @@ rec {
|
|||||||
nuke-refs $out/lib/*
|
nuke-refs $out/lib/*
|
||||||
nuke-refs $out/libexec/gcc/*/*/*
|
nuke-refs $out/libexec/gcc/*/*/*
|
||||||
|
|
||||||
sync
|
(cd $out && tar cvfj $out/bootstrap-tools.tar.bz2 bin lib libexec include include-glibc)
|
||||||
(cd $out && tar cvfj $out/static-tools.tar.bz2 bin lib libexec include include-glibc)
|
|
||||||
''; # */
|
''; # */
|
||||||
|
|
||||||
# The result should not contain any references (store paths) so
|
# The result should not contain any references (store paths) so
|
||||||
@ -123,15 +119,15 @@ rec {
|
|||||||
name = "unpack";
|
name = "unpack";
|
||||||
|
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
tar xvfj ${build}/static-tools.tar.bz2
|
tar xvfj ${build}/bootstrap-tools.tar.bz2
|
||||||
cp -prd . $out
|
cp -prd . $out
|
||||||
rm $out/env-vars
|
rm $out/env-vars
|
||||||
|
|
||||||
for i in $out/bin/* $out/libexec/gcc/*/*/*; do
|
for i in $out/bin/* $out/libexec/gcc/*/*/*; do
|
||||||
echo patching $i
|
echo patching $i
|
||||||
if ! test -L $i; then
|
if ! test -L $i; then
|
||||||
LD_LIBRARY_PATH=$out/lib $out/lib/ld-linux.so.2 \
|
LD_LIBRARY_PATH=$out/lib $out/lib/ld-linux*.so.2 \
|
||||||
$out/bin/patchelf --set-interpreter $out/lib/ld-linux.so.2 --set-rpath $out/lib $i
|
$out/bin/patchelf --set-interpreter $out/lib/ld-linux*.so.2 --set-rpath $out/lib $i
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -169,11 +165,11 @@ rec {
|
|||||||
grep --version
|
grep --version
|
||||||
gcc --version
|
gcc --version
|
||||||
|
|
||||||
perl -e 'print 1 + 2, "\n";'
|
ldlinux=$(echo ${unpack}/lib/ld-linux*.so.2)
|
||||||
|
|
||||||
export CPP="cpp -idirafter ${unpack}/include-glibc -B${unpack}"
|
export CPP="cpp -idirafter ${unpack}/include-glibc -B${unpack}"
|
||||||
export CC="gcc -idirafter ${unpack}/include-glibc -B${unpack} -Wl,-dynamic-linker,${unpack}/lib/ld-linux.so.2 -Wl,-rpath,${unpack}/lib"
|
export CC="gcc -idirafter ${unpack}/include-glibc -B${unpack} -Wl,-dynamic-linker,$ldlinux -Wl,-rpath,${unpack}/lib"
|
||||||
export CXX="g++ -idirafter ${unpack}/include-glibc -B${unpack} -Wl,-dynamic-linker,${unpack}/lib/ld-linux.so.2 -Wl,-rpath,${unpack}/lib"
|
export CXX="g++ -idirafter ${unpack}/include-glibc -B${unpack} -Wl,-dynamic-linker,$ldlinux -Wl,-rpath,${unpack}/lib"
|
||||||
|
|
||||||
echo '#include <stdio.h>' >> foo.c
|
echo '#include <stdio.h>' >> foo.c
|
||||||
echo '#include <limits.h>' >> foo.c
|
echo '#include <limits.h>' >> foo.c
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{stdenv, fetchurl, zlibSupport ? false, zlib, sslSupport ? false, openssl ? null}:
|
{stdenv, fetchurl, zlibSupport ? false, zlib ? null, sslSupport ? false, openssl ? null}:
|
||||||
|
|
||||||
assert zlibSupport -> zlib != null;
|
assert zlibSupport -> zlib != null;
|
||||||
assert sslSupport -> openssl != null;
|
assert sslSupport -> openssl != null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user