diff options
author | Alex Kube <alexander.j.kube@gmail.com> | 2019-10-25 23:49:15 +0430 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-11-25 17:57:22 +0000 |
commit | d4aa1998364f2cac1419b442da4c39699e42391a (patch) | |
tree | 810b0f6a073feb954bbf0bfb1a50f780c8ad732c /meta/recipes-devtools/go/go-cross.inc | |
parent | 0dd3a42c3d79ca63248fbbab6ba19dd42f11b03f (diff) | |
download | poky-d4aa1998364f2cac1419b442da4c39699e42391a.tar.gz |
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 <alexander.j.kube@gmail.com>
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/go-cross.inc')
-rw-r--r-- | meta/recipes-devtools/go/go-cross.inc | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/meta/recipes-devtools/go/go-cross.inc b/meta/recipes-devtools/go/go-cross.inc index 3d344a74d3..3d5803bf07 100644 --- a/meta/recipes-devtools/go/go-cross.inc +++ b/meta/recipes-devtools/go/go-cross.inc | |||
@@ -5,23 +5,14 @@ DEPENDS = "go-native" | |||
5 | 5 | ||
6 | PN = "go-cross-${TUNE_PKGARCH}" | 6 | PN = "go-cross-${TUNE_PKGARCH}" |
7 | 7 | ||
8 | export GOHOSTOS = "${BUILD_GOOS}" | ||
9 | export GOHOSTARCH = "${BUILD_GOARCH}" | ||
10 | export GOOS = "${TARGET_GOOS}" | ||
11 | export GOARCH = "${TARGET_GOARCH}" | ||
12 | export GOARM = "${TARGET_GOARM}" | ||
13 | export GO386 = "${TARGET_GO386}" | ||
14 | export GOMIPS = "${TARGET_GOMIPS}" | ||
15 | export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go" | ||
16 | export GOROOT_FINAL = "${libdir}/go" | ||
17 | export GOCACHE = "${B}/.cache" | 8 | export GOCACHE = "${B}/.cache" |
18 | CC = "${@d.getVar('BUILD_CC').strip()}" | 9 | CC = "${@d.getVar('BUILD_CC').strip()}" |
19 | 10 | ||
20 | do_configure[noexec] = "1" | 11 | do_configure[noexec] = "1" |
21 | 12 | ||
22 | do_compile() { | 13 | do_compile() { |
23 | export CC_FOR_${GOOS}_${GOARCH}="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}" | 14 | export CC_FOR_${TARGET_GOTUPLE}="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}" |
24 | export CXX_FOR_${GOOS}_${GOARCh}="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}" | 15 | export CXX_FOR_${TARGET_GOTUPLE}="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}" |
25 | cd src | 16 | cd src |
26 | ./make.bash --host-only --no-banner | 17 | ./make.bash --host-only --no-banner |
27 | cd ${B} | 18 | cd ${B} |