summaryrefslogtreecommitdiff
path: root/repo/musl/toolchain-musl.xibuild
blob: 4f731715816176c7edf1454c122bcb7a015bdba7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh

DESC="$DESC - for xibuild toolchain"

build () {
    export CXX=clang++
    export CC=clang

    CC=$CC CXX=$CXX ./configure --prefix=/
    make
}

package () {
    make install DESTDIR=$PKG_DEST

    rm -v $PKG_DEST/lib/ld-musl-x86_64.so.1
    ln -sv libc.so $PKG_DEST/lib/ld-musl-x86_64.so.1

    mkdir $PKG_DEST/bin
    mkdir $PKG_DEST/etc
    ln -sv ../lib/libc.so $PKG_DEST/bin/ldd

    cat > $PKG_DEST/etc/ld-musl-x86_64.path << "EOF"
$PKG_DEST/lib
EOF

}