Bug 204883

Summary: lang/go: fix build on armv6hf
Product: Ports & Packages Reporter: Michael Moll <mmoll>
Component: Individual Port(s)Assignee: Julien Laffaye <jlaffaye>
Status: Closed Overcome By Events    
Severity: Affects Some People CC: freebsd-arm, linimon, mmoll
Priority: --- Flags: bugzilla: maintainer-feedback? (jlaffaye)
Version: Latest   
Hardware: arm   
OS: Any   
Bug Depends on: 204882    
Bug Blocks:    
Attachments:
Description Flags
port Makefile patch none

Description Michael Moll freebsd_committer freebsd_triage 2015-11-28 14:14:13 UTC
Created attachment 163630 [details]
port Makefile patch

When building lang/go with a patch similar to the one in #204882 on real ARM h/w I got: "runtime: this system has multiple CPUs and must use atomic synchronization instructions. Recompile using GOARM=7."

For the background, please see https://github.com/golang/go/issues/12067

This is leading to an ugly situation, because (for FreeBSD) AMRv6 also includes ARMv7, while there are really some differences. I did set GOARM=7 in the Makefile and everything is fine for me, but this will lead to binaries not working on ARMv6 CPUs (i.e. the original RPi, while RPi 2 has ARMv7).

I also didn't test this on non-hf armv6.

Some ARM experts should weigh in here. :)