2017-08-23 09:00



I try to compile a go program on my Linux desktop (Linux desktop 4.10.0-28-generic #32-Ubuntu SMP Fri Jun 30 05:32:18 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux), go version go version go1.8.3 linux/amd64 to arm:

$ GOPATH=/home/xrfang/git/hermes/ GOARM=7 GOARCH=arm go build .

the executable is generated, but seems NOT ARMv7:

$ file hermes

hermes: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, not stripped

It shows EABI5. How can I cross-compile to ARMv7? Is there anything missing on my Linux Desktop so that the cross-compile fallback to a lower ARM version?


  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答


  • dongmi6102 dongmi6102 4年前

    I believe, it is not ARMv5. I was trying to do the same on MAC OS and 'file' command on Mac is saying v7, but the 'file' command on Linux don't. However, I do know that v7 has some good improvements and may boost the performance of your program.

    But, that is out of scope of this question and you may need to dig deeper into what you're doing and why a performance improvement is expected. All I can say is, it is compiled for v7.

    点赞 评论 复制链接分享