* 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:
Eelco Dolstra 2003-08-26 13:55:30 +00:00
parent d6cbd38bfb
commit 3638af3cab
2 changed files with 17 additions and 0 deletions

View file

@ -1,10 +1,26 @@
#! /bin/sh
. $stdenv/setup || exit 1
export PATH=$binutils/bin:$PATH
tar xvfj $src || exit 1
mkdir build || exit 1
cd build || 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 install || exit 1

View file

@ -9,5 +9,6 @@ Package(
]))
, ("stdenv", IncludeFix("stdenv-linux/stdenv-nativetools.fix"))
, ("binutils", IncludeFix("binutils/binutils.fix"))
]
)