add musl native gcc toolchain

This commit is contained in:
Phantop 2022-03-28 12:32:45 -04:00
parent d5b4c0a082
commit e42983169e
1 changed files with 19 additions and 0 deletions

19
apps/mkmusl Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
PATH=$(dirname "$(readlink -f "${0}")")/..:$PATH
DIR=/tmp/appdwarf
mkdir -p $DIR
curl http://musl.cc/x86_64-linux-musl-native.tgz | tar xz -C$DIR
mv $DIR/x86_64-linux-musl-native $DIR/musl
ln -s gcc $DIR/musl/bin/cc
cat > $DIR/musl/AppRun << 'EOF'
#!/bin/sh
HERE=$(dirname $(readlink -f "${0}"))
export PATH="${HERE}/bin":$PATH
"$@"
EOF
chmod +x $DIR/musl/AppRun
appdwarf $DIR/musl
mv $DIR/musl.sh musl
rm -rf $DIR/musl