tris: fix cross-compilation and relocation

This commit is contained in:
Filippo Valsorda 2016-12-01 15:06:07 +00:00 committed by Peter Wu
parent 345fbe2a39
commit 831410a948
2 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
GO ?= go GO ?= go
GOENV := $(shell $(GO) env GOOS)_$(shell $(GO) env GOARCH) GOENV := $(shell $(GO) env GOHOSTOS)_$(shell $(GO) env GOHOSTARCH)
GOROOTINFO := $(shell $(GO) version | cut -d' ' -f 3)_$(GOENV) GOROOTINFO := $(shell $(GO) version | cut -d' ' -f 3)_$(GOENV)
.PHONY: GOROOT .PHONY: GOROOT

View File

@ -4,9 +4,9 @@ set -e
BASEDIR=$(cd "$(dirname "$0")" && pwd) BASEDIR=$(cd "$(dirname "$0")" && pwd)
make --quiet -C "$BASEDIR" go >&2 make --quiet -C "$BASEDIR" go >&2
GOENV="$(go env GOOS)_$(go env GOARCH)" GOENV="$(go env GOHOSTOS)_$(go env GOHOSTARCH)"
unset GOROOT export GOROOT="$BASEDIR/go/$GOENV"
make --quiet -C "$BASEDIR" GOROOT GO="$BASEDIR/go/$GOENV/bin/go" >&2 make --quiet -C "$BASEDIR" GOROOT GO="$BASEDIR/go/$GOENV/bin/go" >&2
export GOROOT="$BASEDIR/GOROOT/$GOENV" export GOROOT="$BASEDIR/GOROOT/$GOENV"