我是Go语言的忠实粉丝,现在我正在尝试探索除x86 / amd64之外的其他架构。我为ARM构建Go,它似乎对该目标有很好的支持。所有库都成功构建,测试失败(因为它试图在我的amd64系统上运行ARM测试二进制文件)。
毕竟,我在5g
文件夹中有5l
/ $GOBIN
,他们会生成有效且有效的ARM二进制文件。
但是其他Go工具发生了什么:
5a: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
5c: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
5g: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
5l: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
6cov: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
6nm: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
6prof: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
cgo: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, not stripped
ebnflint: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, not stripped
godefs: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
godoc: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, not stripped
gofix: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, not stripped
gofmt: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, not stripped
goinstall: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, not stripped
gomake: POSIX shell script, ASCII text executable
gopack: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
gopprof: a perl script, ASCII text executable
gotest: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, not stripped
gotry: a bash script, ASCII text executable
gotype: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, not stripped
govet: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, not stripped
goyacc: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, not stripped
hgpatch: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, not stripped
请参阅? cgo
是ARM二进制文件,gofix
和gofmt
也是ARM二进制文件。我认为如果我提供$GOHOSTOS
/ $GOHOSTARCH
变量,我会交叉编译我的应用程序吗?如何使cgo
适用于ARM目标?
答案 0 :(得分:2)
Go linux/arm
端口不完整。例如,cgo
的{{1}}运行时未实现。请参阅linux/arm
和$GOROOT/src/pkg/runtime/cgo/gcc_arm.S
。
[cgo on arm.] Go 1没有计划。