我是Go语言的忠实拥护者,现在我正在尝试探索x86 / amd64以外的其他体系结构。我构建了Go for ARM,它似乎对该目标有很好的支持。所有库都成功构建,并且测试失败(因为它试图在我的amd64系统上运行ARM测试二进制文件)。
毕竟,我的文件夹中有5g/ ,它们会生成有效且有效的ARM二进制文件。但是其他Go工具正在发生什么:5l$GOBIN
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
看?cgo是ARM二进制,gofix和gofmt是ARM二进制文件为好。我以为如果我提供$GOHOSTOS/$GOHOSTARCH变量,我会交叉编译我的应用程序吗?如何获得cgo针对ARM目标的工作?
相关分类