2018-09-08 14:03:28 +02:00
|
|
|
VERSION="1.1.20"
|
2017-12-09 21:51:48 +01:00
|
|
|
SRCDIR="musl-$VERSION"
|
|
|
|
TARBALL="$SRCDIR.tar.gz"
|
2018-02-10 10:48:03 +01:00
|
|
|
URL="https://www.musl-libc.org/releases"
|
2018-09-08 14:03:28 +02:00
|
|
|
SHA256SUM="44be8771d0e6c6b5f82dd15662eb2957c9a3173a19a8b49966ac0542bbd40d61"
|
2018-10-17 00:39:37 +02:00
|
|
|
DEPENDS="tc-gcc1 linux_headers fortify-headers"
|
2017-12-09 21:51:48 +01:00
|
|
|
|
|
|
|
prepare() {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2018-10-19 13:02:06 +02:00
|
|
|
local cflags=""
|
|
|
|
local ldflags=""
|
|
|
|
|
|
|
|
if [ "x$TC_HARDENING" = "xyes" ]; then
|
|
|
|
cflags="-fPIE -fPIC -fstack-protector-all"
|
|
|
|
ldflags="-z noexecstack -z relro -z now"
|
|
|
|
fi
|
2018-10-14 18:47:20 +02:00
|
|
|
|
|
|
|
CFLAGS="$cflags" LDFLAGS="$ldflags" \
|
2018-10-17 00:06:59 +02:00
|
|
|
CROSS_COMPILE="${TARGET}-" $1/configure --prefix=/ --target="$TARGET"
|
|
|
|
CROSS_COMPILE="${TARGET}-" make -j $NUMJOBS
|
2017-12-09 21:51:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
deploy() {
|
|
|
|
local INPUT="$1"
|
2018-02-16 23:22:04 +01:00
|
|
|
local DEPLOY="$2"
|
2017-12-09 21:51:48 +01:00
|
|
|
|
2018-06-17 13:28:18 +02:00
|
|
|
DESTDIR="$DEPLOY" make install-headers
|
2017-12-09 21:51:48 +01:00
|
|
|
DESTDIR="$DEPLOY" make install-libs
|
|
|
|
|
|
|
|
mkdir -p "$DEPLOY/etc"
|
2018-02-15 23:47:54 +01:00
|
|
|
|
2018-02-20 21:30:34 +01:00
|
|
|
cat_file_merge "LDPATH" > "$DEPLOY/etc/ld-musl-${MUSL_CPU}.path"
|
2018-02-17 14:47:42 +01:00
|
|
|
|
2018-06-17 13:28:18 +02:00
|
|
|
find ${DEPLOY}/lib/*.so* -exec stat {} --printf="%n m %a 0 0\\n" \; | \
|
2018-06-16 17:46:17 +02:00
|
|
|
sed "s#^$DEPLOY/##g" | sed "s/644/444/g" | \
|
2018-06-17 13:28:18 +02:00
|
|
|
sed "s/755/555/g" > "$DEPLOY/rootfs_files.txt"
|
2018-06-16 17:46:17 +02:00
|
|
|
|
|
|
|
find "$DEPLOY/etc" -exec stat {} --printf="%n m %a 0 0\\n" \; | \
|
|
|
|
sed "s#^$DEPLOY/##g" | tail -n +2 >> "$DEPLOY/rootfs_files.txt"
|
2017-12-09 21:51:48 +01:00
|
|
|
}
|
2018-05-06 17:23:31 +02:00
|
|
|
|
|
|
|
check_update() {
|
|
|
|
curl --silent -L "$URL" | grep -o ">musl-[0-9.]*tar.gz<" | \
|
|
|
|
sed 's/>musl-//g' | sed 's/.tar.gz<//g' | \
|
|
|
|
verson_find_greatest "$VERSION"
|
2018-06-16 17:46:17 +02:00
|
|
|
}
|