From d4aa1998364f2cac1419b442da4c39699e42391a Mon Sep 17 00:00:00 2001 From: Alex Kube Date: Fri, 25 Oct 2019 23:49:15 +0430 Subject: go: Extract common environment setup. Add default values for go environment variables to go-common.inc. Override where appropriate in other go*.inc files, and use host/target tuples from goarch for setting CC flags. (From OE-Core rev: 1e3f040b1f68fa1f808851ecd9623544e935e9ad) Signed-off-by: Alex Kube Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/recipes-devtools/go/go-common.inc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'meta/recipes-devtools/go/go-common.inc') diff --git a/meta/recipes-devtools/go/go-common.inc b/meta/recipes-devtools/go/go-common.inc index 93a3d3b5fb..f18d928c70 100644 --- a/meta/recipes-devtools/go/go-common.inc +++ b/meta/recipes-devtools/go/go-common.inc @@ -27,6 +27,16 @@ export GOTMPDIR ?= "${WORKDIR}/go-tmp" GOTMPDIR[vardepvalue] = "" export CGO_ENABLED = "1" +export GOHOSTOS ?= "${BUILD_GOOS}" +export GOHOSTARCH ?= "${BUILD_GOARCH}" +export GOROOT_BOOTSTRAP ?= "${STAGING_LIBDIR_NATIVE}/go" +export GOOS ?= "${TARGET_GOOS}" +export GOARCH ?= "${TARGET_GOARCH}" +export GOARM ?= "${TARGET_GOARM}" +export GO386 ?= "${TARGET_GO386}" +export GOMIPS ?= "${TARGET_GOMIPS}" +export GOROOT_FINAL ?= "${libdir}/go" + do_compile_prepend() { BUILD_CC=${BUILD_CC} } -- cgit v1.2.3-54-g00ecf