nixpkgs/pkgs/os-specific/linux/dietlibc/builder.sh

25 lines
556 B
Bash
Raw Normal View History

source $stdenv/setup
makeFlags="prefix=$out"
installFlags="prefix=$out"
postInstall=postInstall
postInstall() {
(cd $out && ln -s lib-* lib)
(cd $out/lib && ln -s start.o crt1.o)
# 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
# Copy <sys/user.h> from Glibc; binutils wants it.
cp $glibc/include/sys/user.h $out/include/sys/
# Remove <dlfcn.h>, it makes some packages think we can load
# dynamic libraries.
rm $out/include/dlfcn.h
}
genericBuild