[Bug 221297] lang/go: Fix arm build

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Sep 23 16:42:27 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221297

Yuval Pavel Zholkover <paulzhol at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |paulzhol at gmail.com

--- Comment #12 from Yuval Pavel Zholkover <paulzhol at gmail.com> ---
Hi,

I maintain the FreeBSD/arm builder, I just wanted to add some quick notes:

As per https://golang.org/doc/install/source#go14, when go 1.4 is used as the
bootstrap toolchain, you must set CGO_ENABLED=0.
Also it's recommended to use
https://dl.google.com/go/go1.4-bootstrap-20171003.tar.gz or the git branch
release-branch.go1.4 directly.
In release-branch.go1.4 CGO_ENABLED=0 is set by default since:
https://github.com/golang/go/commit/94221a06124fe0d0f7ed45a355c72e46ed0e891b.

GOARM=7 is required when running on a multi-core processor. This is because the
dmb instruction is used for memory barriers in various points, and it is an
ARMv7 instruction (the ARMv6 variant "mcr p15, 0, %0, c7, c10, 5" was deemed
too slow and wasn't used).
The check is performed at _runtime_, the dmb instruction is always compiled in.
For GOARM < 7 the dmb instruction is skipped as it is assumed to be single-core
system - this is tested at startup and you get the "runtime: this system has
multiple CPUs and must use atomic synchronization instructions. Recompile using
GOARM=7." message otherwise.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list