summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/go/go-native.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/go/go-native.inc')
-rw-r--r--meta/recipes-devtools/go/go-native.inc16
1 files changed, 9 insertions, 7 deletions
diff --git a/meta/recipes-devtools/go/go-native.inc b/meta/recipes-devtools/go/go-native.inc
index 89bc63459d..c1ada5121a 100644
--- a/meta/recipes-devtools/go/go-native.inc
+++ b/meta/recipes-devtools/go/go-native.inc
@@ -1,8 +1,10 @@
1inherit native 1inherit native
2 2
3BOOTSTRAP ?= ""
3export GOOS = "${BUILD_GOOS}" 4export GOOS = "${BUILD_GOOS}"
4export GOARCH = "${BUILD_GOARCH}" 5export GOARCH = "${BUILD_GOARCH}"
5export GOROOT_FINAL = "${STAGING_LIBDIR_NATIVE}/go" 6export GOROOT_FINAL = "${STAGING_LIBDIR_NATIVE}/go${BOOTSTRAP}"
7export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go1.4"
6export CGO_ENABLED = "1" 8export CGO_ENABLED = "1"
7 9
8do_configure[noexec] = "1" 10do_configure[noexec] = "1"
@@ -31,18 +33,18 @@ END
31} 33}
32 34
33do_install() { 35do_install() {
34 install -d ${D}${libdir}/go 36 install -d ${D}${libdir}/go${BOOTSTRAP}
35 cp -a ${B}/pkg ${D}${libdir}/go/ 37 cp -a ${B}/pkg ${D}${libdir}/go${BOOTSTRAP}/
36 install -d ${D}${libdir}/go/src 38 install -d ${D}${libdir}/go${BOOTSTRAP}/src
37 (cd ${S}/src; for d in *; do \ 39 (cd ${S}/src; for d in *; do \
38 [ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \ 40 [ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go${BOOTSTRAP}/src/; \
39 done) 41 done)
40 42
41 install -d ${D}${bindir} ${D}${libdir}/go/bin 43 install -d ${D}${bindir} ${D}${libdir}/go${BOOTSTRAP}/bin
42 for f in ${B}/bin/* 44 for f in ${B}/bin/*
43 do 45 do
44 base=`basename $f` 46 base=`basename $f`
45 install -m755 $f ${D}${libdir}/go/bin 47 install -m755 $f ${D}${libdir}/go${BOOTSTRAP}/bin
46 make_wrapper $base $base 48 make_wrapper $base $base
47 done 49 done
48} 50}