更新于 2025-01-26
git clone https://github.com/richfelker/musl-cross-make.git
cd musl-cross-make
TARGET = aarch64-linux-musl
OUTPUT = /opt/musl-cross
TARGET 编译的架构
OUTPUT编译生成的文件安装路径
alpine需要安装patch:apk add patch
make
sudo make install
安装完成后,你的交叉编译工具链将会安装在 /opt/musl-cross 目录下。
apk add git patch
apk add gcc g++ make automake autoconf libtool binutils zlib-dev icu-libs wget bash tzdata bash bash-completion shadow
git clone https://github.com/richfelker/musl-cross-make.git
cd musl-cross-make
cat > ./config.mak <<"EOF"
TARGET = aarch64-alpine-linux-musl
EOF
make
sudo make install
cd ..