Golang 编译MIPS helloworld程序出现 Illegal instruction 或者helloworld: applet not found 的解决

编译helloworld程序在MIPS平台上跑出现上述错误。

增加了软浮点编译选项就好了

GOMIPS=hardfloat: use floating point instructions (the default)
GOMIPS=softfloat: use soft floating point

完整的编译命令:

#!/bin/sh
export PATH=$PATH:/usr/local/go/bin:/opt/msdk-4.3.6-mips-EB-2.6.32-0.9.30.3-m32-120424/bin/
export GOPATH=`pwd`/../..
export GOROOT=/usr/local/go
CC=mips-linux-gcc GOARCH=mips GOMIPS=softfloat CGO_ENABLED=1 /usr/local/go/bin/go build -ldflags="-w -s"

猜你喜欢

转载自blog.csdn.net/fuyuande/article/details/86496058
今日推荐