ARM Build Output
Closed this issue · 3 comments
Hi
I'm including the update feature in a golang app targeted for ARM. I'm cross compiling from the latest stable Ubuntu.
When I run:
go-selfupdate {appname} {version} -platform="linux-arm"
The output .json file in public is "linux-amd64.json" should this not be "linux-arm.json"?
Am I setting an incorrect flag?
Just to suppliment my question here is my build env:
$ go env
GOARCH="arm"
GOBIN=""
GOCHAR="5"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/tmp/golang"
GORACE=""
GOROOT="/usr/lib/go"
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
TERM="dumb"
CC="gcc"
GOGCCFLAGS="-g -O2 -fPIC -marm"
CXX="g++"
CGO_ENABLED="0"
As you can see both GOARCH and GOOS are set properly.
Hmm, that is odd. What happens if you omit the -platform flag? It should use GOARCH and GOOS if they are both set.
It does the same.
I ended up hard coding linux-arm instead of reading it from $GOARCH and
$GOOS. Recompiled and tested, it works perfectly.
Thanks
On Tue, Mar 17, 2015 at 2:23 AM, Mark notifications@github.com wrote:
Hmm, that is odd. What happens if you omit the -platform flag? It should
use GOARCH and GOOS if they are both set.—
Reply to this email directly or view it on GitHub
#5 (comment)
.