我怎样才能用go1.6.2构建linux 32位版本 [英] How can I build for linux 32-bit with go1.6.2
本文介绍了我怎样才能用go1.6.2构建linux 32位版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有任何组合的 GOARCH
和 GOOS
值,我可以设置它们来构建ELF 32位二进制?
Is there any combination of GOARCH
and GOOS
values which I can set in order to build ELF 32-bit binary?
推荐答案
GOOS = linux
and GOARCH = 386
。
更多示例:架构:
More examples: architecture:
32-bit -> GOARCH=386
64-bit -> GOARCH=amd64
操作系统:
OS:
Windows -> GOOS=windows
Linux -> GOOS=linux
OS X -> GOOS=darwin
FreeBSD -> GOOS=freebsd
有关完整列表(有效的个人值),请参阅 go / build / syslist.go
file:
For the complete list (valid "individual" values) refer to go/build/syslist.go
file:
const goosList = "android darwin dragonfly freebsd linux nacl netbsd openbsd plan9 solaris windows "
const goarchList = "386 amd64 amd64p32 arm armbe arm64 arm64be ppc64 ppc64le mips mipsle mips64 mips64le mips64p32 mips64p32le ppc s390 s390x sparc sparc64 "
And the valid combinations of GOOS
+ GOARCH
(source):
$GOOS $GOARCH
darwin 386
darwin amd64
darwin arm
darwin arm64
dragonfly amd64
freebsd 386
freebsd amd64
freebsd arm
linux 386
linux amd64
linux arm
linux arm64
linux ppc64
linux ppc64le
linux mips64
linux mips64le
netbsd 386
netbsd amd64
netbsd arm
openbsd 386
openbsd amd64
openbsd arm
plan9 386
plan9 amd64
solaris amd64
windows 386
windows amd64
这篇关于我怎样才能用go1.6.2构建linux 32位版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文