2005-12-13 01:13:01 +01:00
|
|
|
source $stdenv/setup
|
|
|
|
|
2008-06-11 22:04:42 +02:00
|
|
|
preConfigure=preConfigure
|
|
|
|
preConfigure() {
|
|
|
|
libc=$(cat ${NIX_GCC}/nix-support/orig-libc)
|
|
|
|
echo "libc: $libc"
|
2005-12-13 01:13:01 +01:00
|
|
|
|
2008-07-07 13:53:19 +02:00
|
|
|
case "${system}" in
|
|
|
|
x86_64-*) glibclibdir=lib64 ;;
|
|
|
|
*) glibclibdir=lib ;;
|
|
|
|
esac
|
|
|
|
|
2008-06-11 22:04:42 +02:00
|
|
|
for i in src/s/*.h src/m/*.h; do
|
|
|
|
substituteInPlace $i \
|
2008-07-07 13:53:19 +02:00
|
|
|
--replace /usr/${glibclibdir}/crt1.o $libc/${glibclibdir}/crt1.o \
|
|
|
|
--replace /usr/${glibclibdir}/crti.o $libc/${glibclibdir}/crti.o \
|
|
|
|
--replace /usr/${glibclibdir}/crtn.o $libc/${glibclibdir}/crtn.o
|
2008-06-11 22:04:42 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
for i in Makefile.in ./src/Makefile.in ./lib-src/Makefile.in ./leim/Makefile.in; do
|
|
|
|
substituteInPlace $i --replace /bin/pwd pwd
|
|
|
|
done
|
2005-12-13 01:13:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
genericBuild
|