package/go: enable ARMv7 optimizations for 32-bit ARMv8
authorMichael Baudino <michael@baudi.no>
Fri, 18 Dec 2020 10:00:23 +0000 (10:00 +0000)
committerYann E. MORIN <yann.morin.1998@free.fr>
Sat, 19 Dec 2020 11:17:12 +0000 (12:17 +0100)
When building for an ARMv8 in 32-bit, Go does not yet support ARMv8
optimizations (see issue: https://github.com/golang/go/issues/29373)
but can still benefit from ARMv7 optimizations.

Signed-off-by: Michael Baudino <michael@baudi.no>
[yann.morin.1998@free.fr:
  - move the comment to its own line, expand and reword it a bit
  - reword the commit log
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/go/go.mk

index cabbdc84b723e6b68f875ab081e2e67b40e0f7b2..f2d10f5dad971a2bd57ad02dc6a8b6e7b2e5a9bf 100644 (file)
@@ -39,6 +39,10 @@ else ifeq ($(BR2_ARM_CPU_ARMV6),y)
 GO_GOARM = 6
 else ifeq ($(BR2_ARM_CPU_ARMV7A),y)
 GO_GOARM = 7
+else ifeq ($(BR2_ARM_CPU_ARMV8A),y)
+# Go doesn't support 32-bit GOARM=8 (https://github.com/golang/go/issues/29373)
+# but can still benefit from amrv7 optimisations
+GO_GOARM = 7
 endif
 else ifeq ($(BR2_aarch64),y)
 GO_GOARCH = arm64