1 Star 0 Fork 0

Chen / qemu-compiler

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build_compiler.sh 970 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/usr/bin/bash
#rm -rf qemu-compiler/compile_qemu.c ; cp compile_qemu.c qemu-compiler
cp -rf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
sudo apt update
if [[ "$(arch)"="x86_64" ]];then
sudo apt install gcc gcc-aarch64-linux-gnu build-essential -y
elif [[ "$(arch)"="aarch64" ]];then
sudo apt install gcc gcc-x86-64-linux-gnu build-essential -y
fi
mkdir qemu-compiler-arm64 qemu-compiler-x64
time bash -c "aarch64-linux-gnu-gcc -O3 -o qemu-compiler-arm64/qemu-compiler compile_qemu.c -static ;x86_64-linux-gnu-gcc -O3 -o qemu-compiler-x64/qemu-compiler compile_qemu.c -static"
for i in arm64 x64;do
cp LICENSE qemu-compiler-$i
tar -cf qemu-compiler-$i.tar qemu-compiler-$i/*
rm -rf qemu-compiler-$i.tar.gz
gzip qemu-compiler-$i.tar
rm -rf qemu-compiler-$i.tar qemu-compiler-$i
done
#cd qemu-compiler
export COMMIT=$@
if [[ $COMMIT != "" ]];then
git commit -a -m "$@"
git push -u origin main
else
echo "未添加提交信息,默认不会提交到git存储库"
fi
C
1
https://gitee.com/xc1984759471/qemu-compiler.git
git@gitee.com:xc1984759471/qemu-compiler.git
xc1984759471
qemu-compiler
qemu-compiler
main

搜索帮助