* gcc: ensure that the compilers past stage-1 and the libraries are linked

against our glibc.

svn path=/nixpkgs/trunk/; revision=360
wip/yesman
Eelco Dolstra 21 years ago
parent d6cbd38bfb
commit 3638af3cab
  1. 16
      pkgs/gcc/gcc-build.sh
  2. 1
      pkgs/gcc/gcc.fix

@ -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

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

Loading…
Cancel
Save