about summary refs log tree commit diff
path: root/pkgs/os-specific/linux/dietlibc/builder.sh
blob: ab20c8ea1b56d445a43469c7f29447446773198d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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/
}

genericBuild