mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 20:34:52 +03:00
9cb86e27bb
svn path=/nixpkgs/trunk/; revision=12328
29 lines
910 B
Bash
29 lines
910 B
Bash
source $stdenv/setup
|
|
|
|
preConfigure=preConfigure
|
|
preConfigure() {
|
|
libc=$(cat ${NIX_GCC}/nix-support/orig-libc)
|
|
echo "libc: $libc"
|
|
|
|
case "${system}" in
|
|
x86_64-*) glibclibdir=lib64 ;;
|
|
*) glibclibdir=lib ;;
|
|
esac
|
|
|
|
for i in src/s/*.h src/m/*.h; do
|
|
substituteInPlace $i \
|
|
--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 \
|
|
--replace /usr/lib/crt1.o $libc/${glibclibdir}/crt1.o \
|
|
--replace /usr/lib/crti.o $libc/${glibclibdir}/crti.o \
|
|
--replace /usr/lib/crtn.o $libc/${glibclibdir}/crtn.o
|
|
done
|
|
|
|
for i in Makefile.in ./src/Makefile.in ./lib-src/Makefile.in ./leim/Makefile.in; do
|
|
substituteInPlace $i --replace /bin/pwd pwd
|
|
done
|
|
}
|
|
|
|
genericBuild
|