]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commit
package/go: fixing host go cross compilation
authorAngelo Compagnucci <angelo@amarulasolutions.com>
Fri, 11 May 2018 20:50:33 +0000 (22:50 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Fri, 11 May 2018 21:05:29 +0000 (23:05 +0200)
commitb0e34e6690df382042eb29b148236d071f492a45
treea73a6520130fbedb7afe27bc0993eec3d5473731
parent970cb26ec22e165c9b1fea27a85cfe5762096b19
package/go: fixing host go cross compilation

Actually if GOHOSTOS == GOOS || GOHOSTARCH == GOARCH the go build system assume
it's not cross compiling and uses the same toolchain for both the host and the
target. This commit adds a patch to enable the explicit
GO_ASSUME_CROSSCOMPILING in go build system and updates to go package
accordingly.

Fixes:
http://autobuild.buildroot.net/results/3636b1ac5756a782fd7578186508aaf9d105e3e9/
http://autobuild.buildroot.net/results/25790dca7e19527bb360d7dfb325cd9cfc3b56cc/
and many more.

References:
https://github.com/golang/go/issues/25177
https://golang.org/cl/112156

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/go/0001-build.go-explicit-option-for-crosscompilation.patch [new file with mode: 0644]
package/go/go.mk