diff mbox series

[1/2] go: specify GOARM when compiling target binaries

Message ID 20181107201259.28717-1-christian@paral.in
State Not Applicable
Headers show
Series [1/2] go: specify GOARM when compiling target binaries | expand

Commit Message

Christian Stewart Nov. 7, 2018, 8:12 p.m. UTC
Currently, GOARM is not specified correctly when compiling target binaries. This
results in incompatibility / illegal instruction issues on some ARM devices.

Signed-off-by: Christian Stewart <christian@paral.in>
---
 package/go/go.mk | 1 +
 1 file changed, 1 insertion(+)

Comments

Christian Stewart Nov. 7, 2018, 10:27 p.m. UTC | #1
All,

On Wed, Nov 7, 2018 at 12:13 PM Christian Stewart <christian@paral.in> wrote:
> Currently, GOARM is not specified correctly when compiling target binaries. This
> results in incompatibility / illegal instruction issues on some ARM devices.

Withdrawing this patch, while investigating a SIGILL with Cgo,
possibly related to using thumb2 instructions on arm (when Go only
supports standard arm instructions).

See https://github.com/golang/go/issues/28642

Thanks,
Christian Stewart
diff mbox series

Patch

diff --git a/package/go/go.mk b/package/go/go.mk
index ec74ba397c..8423dc7eea 100644
--- a/package/go/go.mk
+++ b/package/go/go.mk
@@ -43,6 +43,7 @@  HOST_GO_ROOT = $(HOST_DIR)/lib/go
 HOST_GO_TOOLDIR = $(HOST_GO_ROOT)/pkg/tool/linux_$(GO_GOARCH)
 HOST_GO_TARGET_ENV = \
 	GOARCH=$(GO_GOARCH) \
+	$(if $(GO_GOARM),GOARM=$(GO_GOARM)) \
 	GOROOT="$(HOST_GO_ROOT)" \
 	CC="$(TARGET_CC)" \
 	CXX="$(TARGET_CXX)" \