2005-12-05 14:11:09 +00:00
|
|
|
source $stdenv/setup
|
2005-08-28 00:05:50 +01:00
|
|
|
|
2006-10-18 12:25:10 +01:00
|
|
|
makeFlags="prefix=$out"
|
|
|
|
installFlags="prefix=$out"
|
2005-08-28 00:05:50 +01:00
|
|
|
|
2006-10-18 12:25:10 +01:00
|
|
|
postInstall() {
|
|
|
|
(cd $out && ln -s lib-* lib)
|
|
|
|
(cd $out/lib && ln -s start.o crt1.o)
|
2006-10-18 13:45:46 +01:00
|
|
|
|
|
|
|
# Fake crti.o and crtn.o.
|
|
|
|
touch empty.c
|
|
|
|
gcc -c empty.c -o $out/lib/crti.o
|
|
|
|
gcc -c empty.c -o $out/lib/crtn.o
|
2006-10-19 11:54:40 +01:00
|
|
|
|
|
|
|
# Copy <sys/user.h> from Glibc; binutils wants it.
|
|
|
|
cp $glibc/include/sys/user.h $out/include/sys/
|
2006-10-21 12:36:28 +01:00
|
|
|
|
|
|
|
# Remove <dlfcn.h>, it makes some packages think we can load
|
|
|
|
# dynamic libraries.
|
|
|
|
rm $out/include/dlfcn.h
|
2006-11-03 11:09:06 +00:00
|
|
|
|
|
|
|
# Dietlibc has a asm include directory, whose presence makes the
|
|
|
|
# asm directory of kernel-headers unreachable. So make symlinks
|
|
|
|
# from the dietlibc asm to the kernel-headers asm.
|
|
|
|
ln -s $kernelHeaders/include/asm/* $out/include/asm/ || true
|
2006-11-03 13:32:58 +00:00
|
|
|
|
2008-03-07 15:36:21 +00:00
|
|
|
# Make asm-x86_64 etc. available.
|
|
|
|
for i in $kernelHeaders/include/asm-*; do
|
|
|
|
ln -s $i $out/include/
|
|
|
|
done
|
|
|
|
|
2006-11-03 13:32:58 +00:00
|
|
|
# Idem for include/linux.
|
|
|
|
ln -s $kernelHeaders/include/linux/* $out/include/linux/ || true
|
2006-10-18 12:25:10 +01:00
|
|
|
}
|
2005-08-28 00:05:50 +01:00
|
|
|
|
|
|
|
genericBuild
|