* gcc: ensure that the compilers past stage-1 and the libraries are linked
against our glibc. svn path=/nixpkgs/trunk/; revision=360
This commit is contained in:
parent
d6cbd38bfb
commit
3638af3cab
@ -1,10 +1,26 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
. $stdenv/setup || exit 1
|
. $stdenv/setup || exit 1
|
||||||
|
export PATH=$binutils/bin:$PATH
|
||||||
|
|
||||||
tar xvfj $src || exit 1
|
tar xvfj $src || exit 1
|
||||||
mkdir build || exit 1
|
mkdir build || exit 1
|
||||||
cd build || exit 1
|
cd build || exit 1
|
||||||
../gcc-*/configure --prefix=$out --enable-languages=c,c++ || exit 1
|
../gcc-*/configure --prefix=$out --enable-languages=c,c++ || exit 1
|
||||||
|
|
||||||
|
extraflags="$NIX_CFLAGS $NIX_LDFLAGS -Wl,-s"
|
||||||
|
|
||||||
|
mf=Makefile
|
||||||
|
sed \
|
||||||
|
-e "s^FLAGS_FOR_TARGET =\(.*\)^FLAGS_FOR_TARGET = \1 $extraflags^" \
|
||||||
|
< $mf > $mf.tmp || exit 1
|
||||||
|
mv $mf.tmp $mf
|
||||||
|
|
||||||
|
mf=gcc/Makefile
|
||||||
|
sed \
|
||||||
|
-e "s^X_CFLAGS =\(.*\)^X_CFLAGS = \1 $extraflags^" \
|
||||||
|
< $mf > $mf.tmp || exit 1
|
||||||
|
mv $mf.tmp $mf
|
||||||
|
|
||||||
make bootstrap || exit 1
|
make bootstrap || exit 1
|
||||||
make install || exit 1
|
make install || exit 1
|
||||||
|
@ -9,5 +9,6 @@ Package(
|
|||||||
]))
|
]))
|
||||||
|
|
||||||
, ("stdenv", IncludeFix("stdenv-linux/stdenv-nativetools.fix"))
|
, ("stdenv", IncludeFix("stdenv-linux/stdenv-nativetools.fix"))
|
||||||
|
, ("binutils", IncludeFix("binutils/binutils.fix"))
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user