Skip to contentSkip to conversation

go: specify GOARM when compiling target binaries

PATCH New Christian Stewart 3 participants 5 messages Nov 7, 2018 – Nov 8, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 go: specify GOARM when compiling target binaries

Currently, GOARM is not specified correctly when compiling target binaries. This results in incompatibility / illegal instruction issues on some ARM devices.

---
 package/go/go.mk | 1 +
 1 file changed, 1 insertion(+)
package/go/go.mk +1 -0
index ec74ba397c..8423dc7eea 100644
@@ -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)" \
Signature · 1 line
2.18.1
#1 lore raw

PATCH 1/2 go: specify GOARM when compiling target binaries

All,

Quoted 2 lines · Christian Stewart

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

#2 lore raw

PATCH 2/2 DEVELOPERS: add Christian Stewart for go

In reply to Christian Stewart

I am now maintaining / submitting regular patches for the Go toolchain as well.

---
 DEVELOPERS | 1 +
 1 file changed, 1 insertion(+)
DEVELOPERS +1 -0
index 8d5ed199ce..b95f6c583c 100644
@@ -468,6 +468,7 @@ F:	package/batman-adv/
 F:	package/docker-containerd/
 F:	package/docker-engine/
 F:	package/docker-proxy/
+F:	package/go/
 F:	package/mosh/
 F:	package/rtl8821au/
 F:	package/runc/
Signature · 1 line
2.18.1
#3 lore raw

PATCH 2/2 DEVELOPERS: add Christian Stewart for go

Hi Christian,

Quoted 22 lines · Christian Stewart

I am now maintaining / submitting regular patches for the Go toolchain as well.

---
 DEVELOPERS | 1 +
 1 file changed, 1 insertion(+)
DEVELOPERS +1 -0
index 8d5ed199ce..b95f6c583c 100644
@@ -468,6 +468,7 @@ F:	package/batman-adv/
 F:	package/docker-containerd/
 F:	package/docker-engine/
 F:	package/docker-proxy/
+F:	package/go/
 F:	package/mosh/
 F:	package/rtl8821au/
 F:	package/runc/
Signature · 1 line
2.18.1

While the previous patch has been withdrawn, you still want this patch applied, correct ?

Regards,

Anisse

#4 lore raw

PATCH 2/2 DEVELOPERS: add Christian Stewart for go

In reply to Christian Stewart

Hello,

Quoted 6 lines · Christian Stewart

I am now maintaining / submitting regular patches for the Go toolchain as well.

---
 DEVELOPERS | 1 +
 1 file changed, 1 insertion(+)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com