2005-12-05 15:11:09 +01:00
|
|
|
source $stdenv/setup
|
2005-08-28 01:05:50 +02:00
|
|
|
|
2006-10-18 13:25:10 +02:00
|
|
|
makeFlags="prefix=$out"
|
|
|
|
installFlags="prefix=$out"
|
2005-08-28 01:05:50 +02:00
|
|
|
|
2006-10-18 13:25:10 +02:00
|
|
|
postInstall() {
|
|
|
|
(cd $out && ln -s lib-* lib)
|
|
|
|
(cd $out/lib && ln -s start.o crt1.o)
|
2006-10-18 14:45:46 +02: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 12:54:40 +02:00
|
|
|
|
|
|
|
# Copy <sys/user.h> from Glibc; binutils wants it.
|
|
|
|
cp $glibc/include/sys/user.h $out/include/sys/
|
2006-10-21 13:36:28 +02:00
|
|
|
|
|
|
|
# Remove <dlfcn.h>, it makes some packages think we can load
|
|
|
|
# dynamic libraries.
|
|
|
|
rm $out/include/dlfcn.h
|
2006-11-03 12:09:06 +01: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 14:32:58 +01:00
|
|
|
|
2008-03-07 16:36:21 +01:00
|
|
|
# Make asm-x86_64 etc. available.
|
|
|
|
for i in $kernelHeaders/include/asm-*; do
|
|
|
|
ln -s $i $out/include/
|
|
|
|
done
|
|
|
|
|
2006-11-03 14:32:58 +01:00
|
|
|
# Idem for include/linux.
|
|
|
|
ln -s $kernelHeaders/include/linux/* $out/include/linux/ || true
|
2006-10-18 13:25:10 +02:00
|
|
|
}
|
2005-08-28 01:05:50 +02:00
|
|
|
|
|
|
|
genericBuild
|