1、安装mips go(/home/code/go/mips/)
git clone https://github.com/gomini/go-mips32.git
cd go-mips32/src
./make.bash
2、编写代码hello.go
package main
import "fmt"
func main() {
fmt.Printf("hello, world\n")
}
3、编译
root@ubuntu:/home/code/go/hello# CGO_ENABLED=0 GOOS=linux GOARCH=mips32le ../mips/go-mips32/bin/go build hello.go