summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/go/go-runtime_1.9.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/go/go-runtime_1.9.bb')
-rw-r--r--meta/recipes-devtools/go/go-runtime_1.9.bb21
1 files changed, 21 insertions, 0 deletions
diff --git a/meta/recipes-devtools/go/go-runtime_1.9.bb b/meta/recipes-devtools/go/go-runtime_1.9.bb
index 43b68b4e46..a99cc30f63 100644
--- a/meta/recipes-devtools/go/go-runtime_1.9.bb
+++ b/meta/recipes-devtools/go/go-runtime_1.9.bb
@@ -1,2 +1,23 @@
1require go-${PV}.inc 1require go-${PV}.inc
2require go-runtime.inc 2require go-runtime.inc
3
4export GO_TARGET_INSTALL = "std"
5export CC_FOR_TARGET = "${CC}"
6export CXX_FOR_TARGET = "${CXX}"
7
8do_compile() {
9 export GOBIN="${B}/bin"
10 export TMPDIR="$GOTMPDIR"
11 export CC=$BUILD_CC
12
13 cd src
14 ./make.bash --host-only
15 cp ${B}/pkg/tool/${BUILD_GOTUPLE}/go_bootstrap ${B}
16 rm -rf ${B}/pkg/${TARGET_GOTUPLE}
17 ./make.bash --target-only
18 if [ -n "${GO_DYNLINK}" ]; then
19 cp ${B}/go_bootstrap ${B}/pkg/tool/${BUILD_GOTUPLE}
20 GO_FLAGS="-buildmode=shared" GO_LDFLAGS="-extldflags \"${LDFLAGS}\"" ./make.bash --target-only
21 fi
22 cd ${B}
23}