系统环境说明
系统:deepin V20
平台:x86_64
交叉编译器:mips-loongson-gcc7.3-2019.06-29-linux-gnu
,即gcc-7.3.1
。(待后续更正)
笔记: 可参考链接 http://www.loongson.cn/news/company/456.html
交叉编译环境
(使用gccgo交叉编译,暂不需要本交叉编译环境,待后续更正)
下载交叉编译工具链
wget http://ftp.loongnix.org/toolchain/gcc/release/mips-loongson-gcc7.3-2019.06-29-linux-gnu.tar.gz
交叉编译化境搭建见在x86_64平台上搭建龙芯MIPS64交叉编译环境
依赖应用安装
# 安装git
sudo apt install git
# 安装gccgo
sudo apt install gccgo-7
sudo ln -s /bin/go-7 /bin/go
编译安装gccgo
(后续更新)
签出gcc源代码
# 使用github
git clone https://github.com/gcc-mirror/gcc.git
编译与安装
获取源代码
git clone https://github.com/golang/go.git
编译
GOOS=linux GOARCH=mipsle ./bootstrap.bash
编译完后生成go-linux-mipsle-bootstrap.tbz
压缩包
尚未验证运行