From 831410a9488746406afa28120dd56bedd6a861d9 Mon Sep 17 00:00:00 2001 From: Filippo Valsorda Date: Thu, 1 Dec 2016 15:06:07 +0000 Subject: [PATCH] tris: fix cross-compilation and relocation --- _dev/Makefile | 2 +- _dev/go.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/_dev/Makefile b/_dev/Makefile index 7c2a3d3..25ded44 100644 --- a/_dev/Makefile +++ b/_dev/Makefile @@ -1,5 +1,5 @@ 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) .PHONY: GOROOT diff --git a/_dev/go.sh b/_dev/go.sh index fa7babf..d5e7a99 100755 --- a/_dev/go.sh +++ b/_dev/go.sh @@ -4,9 +4,9 @@ set -e BASEDIR=$(cd "$(dirname "$0")" && pwd) 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 export GOROOT="$BASEDIR/GOROOT/$GOENV"