我试图编译我的简单程序:
根据文档,在我的PC上使用64位Debian Linux转换为MIPS架构
https://golang.org/doc/install/source#environment
通过使用命令
每次我得到错误:
runtime/internal/sys compile
unknown architecture"mipsle(mips)"
有趣的是,如果尝试使用命令:
该程序已生成。
是否取决于我PC上的系统OS? 如何为MIPS或MIPSLE构建二进制文件?
Go 1.6不支持MIPS或MIPSLE。 1.6支持MIPS64(LE)。 1.8支持MIPS(LE)。
从https://golang.org/doc/install/source:
- amd64 (also known as x86-64)
- A mature implementation.
- 386 (x86 or x86-32)
- Comparable to the amd64 port.
- arm (ARM)
- Supports Linux, FreeBSD, NetBSD, OpenBSD and Darwin binaries. Less widely used than the other ports.
- arm64 (AArch64)
- Supports Linux and Darwin binaries. New in 1.5 and not as well exercised as other ports.
- ppc64, ppc64le (64-bit PowerPC big- and little-endian)
- Supports Linux binaries. New in 1.5 and not as well exercised as other ports.
- mips, mipsle (32-bit MIPS big- and little-endian)
- Supports Linux binaries. New in 1.8 and not as well exercised as other ports.
- mips64, mips64le (64-bit MIPS big- and little-endian)
- Supports Linux binaries. New in 1.6 and not as well exercised as other ports.
- s390x (IBM System z)
- Supports Linux binaries. New in 1.7 and not as well exercised as other ports.