summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/go
diff options
context:
space:
mode:
authorMatt Madison <matt@madison.systems>2018-03-04 13:09:32 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-06 06:43:10 -0800
commit020915eb9b2dd4632b44ba7c18bd09f944a03042 (patch)
tree4f9bcea06dd11b12d7a838dbb6ba84c330adebbf /meta/recipes-devtools/go
parent58472bc7d07df7c713baffea16a1e3f48295cb5f (diff)
downloadpoky-020915eb9b2dd4632b44ba7c18bd09f944a03042.tar.gz
go: move common settings to go-common.inc
Eliminate some redundancy in the recipes by moving some commonly-used variable settings to the common include file. Also removed a duplicate inherit from go-target.inc that was already in go-common.inc. (From OE-Core rev: e72d2a7b7ee7913095a35ae92c3ca364de00c8a7) Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/go')
-rw-r--r--meta/recipes-devtools/go/go-common.inc4
-rw-r--r--meta/recipes-devtools/go/go-cross-canadian.inc4
-rw-r--r--meta/recipes-devtools/go/go-cross.inc3
-rw-r--r--meta/recipes-devtools/go/go-crosssdk.inc4
-rw-r--r--meta/recipes-devtools/go/go-native.inc3
-rw-r--r--meta/recipes-devtools/go/go-runtime.inc5
-rw-r--r--meta/recipes-devtools/go/go-target.inc5
7 files changed, 5 insertions, 23 deletions
diff --git a/meta/recipes-devtools/go/go-common.inc b/meta/recipes-devtools/go/go-common.inc
index 611775b2cc..11d55c4d36 100644
--- a/meta/recipes-devtools/go/go-common.inc
+++ b/meta/recipes-devtools/go/go-common.inc
@@ -23,6 +23,10 @@ INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
23SSTATE_SCAN_CMD = "true" 23SSTATE_SCAN_CMD = "true"
24 24
25export GOROOT_OVERRIDE = "1" 25export GOROOT_OVERRIDE = "1"
26export GOTMPDIR ?= "${WORKDIR}/go-tmp"
27GOTMPDIR[vardepvalue] = ""
28export GOCACHE = "off"
29export CGO_ENABLED = "1"
26 30
27do_compile_prepend() { 31do_compile_prepend() {
28 BUILD_CC=${BUILD_CC} 32 BUILD_CC=${BUILD_CC}
diff --git a/meta/recipes-devtools/go/go-cross-canadian.inc b/meta/recipes-devtools/go/go-cross-canadian.inc
index 4a43d831fa..e630b83df8 100644
--- a/meta/recipes-devtools/go/go-cross-canadian.inc
+++ b/meta/recipes-devtools/go/go-cross-canadian.inc
@@ -10,10 +10,6 @@ export GOHOSTARCH = "${BUILD_GOARCH}"
10export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go" 10export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
11export GOTOOLDIR_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/${HOST_SYS}/go/pkg/tool/${BUILD_GOTUPLE}" 11export GOTOOLDIR_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/${HOST_SYS}/go/pkg/tool/${BUILD_GOTUPLE}"
12export GOROOT_FINAL = "${libdir}/go" 12export GOROOT_FINAL = "${libdir}/go"
13export CGO_ENABLED = "1"
14export GOCACHE = "off"
15export GOTMPDIR ?= "${WORKDIR}/go-tmp"
16GOTMPDIR[vardepvalue] = ""
17export CGO_CFLAGS = "${CFLAGS}" 13export CGO_CFLAGS = "${CFLAGS}"
18export CGO_LDFLAGS = "${LDFLAGS}" 14export CGO_LDFLAGS = "${LDFLAGS}"
19export GO_LDFLAGS = '-linkmode external -extld ${HOST_PREFIX}gcc -extldflags "--sysroot=${STAGING_DIR_HOST} ${HOST_CC_ARCH} ${LDFLAGS}"' 15export GO_LDFLAGS = '-linkmode external -extld ${HOST_PREFIX}gcc -extldflags "--sysroot=${STAGING_DIR_HOST} ${HOST_CC_ARCH} ${LDFLAGS}"'
diff --git a/meta/recipes-devtools/go/go-cross.inc b/meta/recipes-devtools/go/go-cross.inc
index 289ae77104..44f230b8bc 100644
--- a/meta/recipes-devtools/go/go-cross.inc
+++ b/meta/recipes-devtools/go/go-cross.inc
@@ -15,9 +15,6 @@ export GOMIPS = "${TARGET_GOMIPS}"
15export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go" 15export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
16export GOROOT_FINAL = "${libdir}/go" 16export GOROOT_FINAL = "${libdir}/go"
17export GOCACHE = "off" 17export GOCACHE = "off"
18export GOTMPDIR ?= "${WORKDIR}/go-tmp"
19GOTMPDIR[vardepvalue] = ""
20export CGO_ENABLED = "1"
21CC = "${@d.getVar('BUILD_CC').strip()}" 18CC = "${@d.getVar('BUILD_CC').strip()}"
22 19
23do_configure[noexec] = "1" 20do_configure[noexec] = "1"
diff --git a/meta/recipes-devtools/go/go-crosssdk.inc b/meta/recipes-devtools/go/go-crosssdk.inc
index 05ca62eba8..4391b32424 100644
--- a/meta/recipes-devtools/go/go-crosssdk.inc
+++ b/meta/recipes-devtools/go/go-crosssdk.inc
@@ -10,10 +10,6 @@ export GOOS = "${TARGET_GOOS}"
10export GOARCH = "${TARGET_GOARCH}" 10export GOARCH = "${TARGET_GOARCH}"
11export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go" 11export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
12export GOROOT_FINAL = "${libdir}/go" 12export GOROOT_FINAL = "${libdir}/go"
13export CGO_ENABLED = "1"
14export GOCACHE = "off"
15export GOTMPDIR ?= "${WORKDIR}/go-tmp"
16GOTMPDIR[vardepvalue] = ""
17 13
18do_configure[noexec] = "1" 14do_configure[noexec] = "1"
19 15
diff --git a/meta/recipes-devtools/go/go-native.inc b/meta/recipes-devtools/go/go-native.inc
index 35561768df..b76fb0825e 100644
--- a/meta/recipes-devtools/go/go-native.inc
+++ b/meta/recipes-devtools/go/go-native.inc
@@ -10,11 +10,8 @@ SRC_URI[bootstrap.sha256sum] = "f4ff5b5eb3a3cae1c993723f3eab519c5bae18866b5e5f96
10 10
11export GOOS = "${BUILD_GOOS}" 11export GOOS = "${BUILD_GOOS}"
12export GOARCH = "${BUILD_GOARCH}" 12export GOARCH = "${BUILD_GOARCH}"
13export GOTMPDIR ?= "${WORKDIR}/go-tmp"
14GOTMPDIR[vardepvalue] = ""
15CC = "${@d.getVar('BUILD_CC').strip()}" 13CC = "${@d.getVar('BUILD_CC').strip()}"
16 14
17export CGO_ENABLED = "1"
18GOMAKEARGS ?= "--no-banner" 15GOMAKEARGS ?= "--no-banner"
19 16
20do_configure() { 17do_configure() {
diff --git a/meta/recipes-devtools/go/go-runtime.inc b/meta/recipes-devtools/go/go-runtime.inc
index 0fe4566360..a79295df47 100644
--- a/meta/recipes-devtools/go/go-runtime.inc
+++ b/meta/recipes-devtools/go/go-runtime.inc
@@ -11,14 +11,11 @@ export GO386 = "${TARGET_GO386}"
11export GOMIPS = "${TARGET_GOMIPS}" 11export GOMIPS = "${TARGET_GOMIPS}"
12export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go" 12export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
13export GOROOT_FINAL = "${libdir}/go" 13export GOROOT_FINAL = "${libdir}/go"
14export CGO_ENABLED = "1"
15export CGO_CFLAGS = "${CFLAGS}" 14export CGO_CFLAGS = "${CFLAGS}"
16export CGO_CPPFLAGS = "${CPPFLAGS}" 15export CGO_CPPFLAGS = "${CPPFLAGS}"
17export CGO_CXXFLAGS = "${CXXFLAGS}" 16export CGO_CXXFLAGS = "${CXXFLAGS}"
18export CGO_LDFLAGS = "${LDFLAGS}" 17export CGO_LDFLAGS = "${LDFLAGS}"
19export GOCACHE = "off" 18
20export GOTMPDIR ?= "${WORKDIR}/go-tmp"
21GOTMPDIR[vardepvalue] = ""
22GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${LDFLAGS}" 19GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${LDFLAGS}"
23GO_LINKMODE ?= "" 20GO_LINKMODE ?= ""
24GO_LINKMODE_class-nativesdk = "--linkmode=external" 21GO_LINKMODE_class-nativesdk = "--linkmode=external"
diff --git a/meta/recipes-devtools/go/go-target.inc b/meta/recipes-devtools/go/go-target.inc
index 141a456cca..3bc32f3bec 100644
--- a/meta/recipes-devtools/go/go-target.inc
+++ b/meta/recipes-devtools/go/go-target.inc
@@ -1,4 +1,3 @@
1inherit goarch
2DEPENDS = "virtual/${TARGET_PREFIX}go go-native" 1DEPENDS = "virtual/${TARGET_PREFIX}go go-native"
3DEPENDS_class-nativesdk = "virtual/${TARGET_PREFIX}go-crosssdk go-native" 2DEPENDS_class-nativesdk = "virtual/${TARGET_PREFIX}go-crosssdk go-native"
4 3
@@ -11,10 +10,6 @@ export GO386 = "${TARGET_GO386}"
11export GOMIPS = "${TARGET_GOMIPS}" 10export GOMIPS = "${TARGET_GOMIPS}"
12export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go" 11export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
13export GOROOT_FINAL = "${libdir}/go" 12export GOROOT_FINAL = "${libdir}/go"
14export CGO_ENABLED = "1"
15export GOCACHE = "off"
16export GOTMPDIR ?= "${WORKDIR}/go-tmp"
17GOTMPDIR[vardepvalue] = ""
18GO_LDFLAGS = "" 13GO_LDFLAGS = ""
19GO_LDFLAGS_class-nativesdk = "-linkmode external" 14GO_LDFLAGS_class-nativesdk = "-linkmode external"
20export GO_LDFLAGS 15export GO_LDFLAGS