Golang 编译MIPS helloworld程序出现 Illegal instruction 或者helloworld: applet not found 的解决
生活随笔
收集整理的这篇文章主要介绍了
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"
总结
以上是生活随笔为你收集整理的Golang 编译MIPS helloworld程序出现 Illegal instruction 或者helloworld: applet not found 的解决的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: 释放skb buffer指针引出的指针传
- 下一篇: c语言命令行选项处理函数getopt和g