aboutsummaryrefslogtreecommitdiff
path: root/i686/musl/build
blob: 0549bc5fff75191c6146436cb1d7297abbdea952 (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
#!/bin/sh -e

./configure \
    --prefix=/usr \
    --syslibdir=/usr/lib

make
make DESTDIR="$1" install

mkdir -p "$1/usr/bin"
ln -s libc.so "$1/usr/lib/libc.musl-x86.so"
ln -s /usr/lib/ld-musl-i386.so.1 "$1/usr/bin/ldd"

# Install BSD compatibility headers.
install -Dm 755 cdefs.h "$1/usr/include/sys/cdefs.h"
install -Dm 755 queue.h "$1/usr/include/sys/queue.h"
install -Dm 755 tree.h  "$1/usr/include/sys/tree.h"

# Install getconf.
"${CC:-cc}" getconf.c -o "$1/usr/bin/getconf"

# Install libssp_nonshared.a
"${CC:-cc}" -c __stack_chk_fail_local.c -o __stack_chk_fail_local.o
ar r "$1/usr/lib/libssp_nonshared.a"       __stack_chk_fail_local.o