Tools: Add arm-linux-musleabihf toolchain

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
This commit is contained in:
Patrick José Pereira 2020-08-25 14:03:02 -03:00 committed by Peter Barker
parent ee4f267743
commit 30e2aad6b9
1 changed files with 13 additions and 0 deletions

View File

@ -12,6 +12,9 @@ ARM_TARBALL="$ARM_ROOT-linux.tar.bz2"
RPI_ROOT="master"
RPI_TARBALL="$RPI_ROOT.tar.gz"
MUSL_ROOT="arm-linux-musleabihf-cross"
MUSL_TBZ="$MUSL_ROOT.tgz"
CCACHE_ROOT="ccache-3.4.2"
CCACHE_TARBALL="$CCACHE_ROOT.tar.bz2"
@ -32,6 +35,13 @@ if [ ! -d "$HOME/opt/$dir" -o ! -x "$HOME/opt/$dir/bin/arm-linux-gnueabihf-g++"
tar -xf $RPI_TARBALL -C opt $dir
fi
# musl toolchain
dir=$MUSL_ROOT
if [ ! -d "$HOME/opt/$dir" -o ! -x "$HOME/opt/$dir/bin/arm-linux-musleabihf-g++" ]; then
wget https://musl.cc/$MUSL_TBZ
tar -xf $MUSL_TBZ -C opt
fi
# ccache
dir=$CCACHE_ROOT
if [ ! -d "$HOME/opt/$dir" ]; then
@ -65,6 +75,8 @@ ln -s ~/opt/$CCACHE_ROOT/ccache ~/ccache/arm-none-eabi-g++
ln -s ~/opt/$CCACHE_ROOT/ccache ~/ccache/arm-none-eabi-gcc
ln -s ~/opt/$CCACHE_ROOT/ccache ~/ccache/arm-linux-gnueabihf-g++
ln -s ~/opt/$CCACHE_ROOT/ccache ~/ccache/arm-linux-gnueabihf-gcc
ln -s ~/opt/$CCACHE_ROOT/ccache ~/ccache/arm-linux-musleabihf-gcc
ln -s ~/opt/$CCACHE_ROOT/ccache ~/ccache/arm-linux-musleabihf-g++
ln -s ~/opt/$CCACHE_ROOT/ccache ~/ccache/clang++
ln -s ~/opt/$CCACHE_ROOT/ccache ~/ccache/clang
@ -73,6 +85,7 @@ exportline="${exportline}:$HOME/bin"
exportline="${exportline}:$HOME/.local/bin"
exportline="${exportline}:$HOME/opt/gcc-arm-none-eabi-6-2017-q2-update/bin"
exportline="${exportline}:$HOME/opt/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin"
exportline="${exportline}:$HOME/opt/arm-linux-musleabihf-cross/bin"
exportline="${exportline}:$HOME/opt/$CCACHE_ROOT"
exportline="${exportline}:\$PATH"