[oe-commits] [openembedded-core] 02/03: go: add native recipes for 1.8

git at git.openembedded.org git at git.openembedded.org
Tue Mar 14 14:42:42 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 13a5c3dac4b5b0ccb4c5dfebf79b468acd8e1983
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Mon Mar 13 12:57:37 2017 -0700

    go: add native recipes for 1.8
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/recipes-devtools/go/go-bootstrap-native_1.4.bb      |  3 +++
 meta/recipes-devtools/go/go-native.inc                   | 16 +++++++++-------
 .../go/{go-native_1.4.bb => go-native_1.8.bb}            |  1 +
 meta/recipes-devtools/go/go.inc                          |  4 ++--
 4 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/meta/recipes-devtools/go/go-bootstrap-native_1.4.bb b/meta/recipes-devtools/go/go-bootstrap-native_1.4.bb
new file mode 100644
index 0000000..3d4141e
--- /dev/null
+++ b/meta/recipes-devtools/go/go-bootstrap-native_1.4.bb
@@ -0,0 +1,3 @@
+BOOTSTRAP = "1.4"
+require go-native.inc
+require go-${PV}.inc
diff --git a/meta/recipes-devtools/go/go-native.inc b/meta/recipes-devtools/go/go-native.inc
index 89bc634..c1ada51 100644
--- a/meta/recipes-devtools/go/go-native.inc
+++ b/meta/recipes-devtools/go/go-native.inc
@@ -1,8 +1,10 @@
 inherit native
 
+BOOTSTRAP ?= ""
 export GOOS = "${BUILD_GOOS}"
 export GOARCH = "${BUILD_GOARCH}"
-export GOROOT_FINAL = "${STAGING_LIBDIR_NATIVE}/go"
+export GOROOT_FINAL = "${STAGING_LIBDIR_NATIVE}/go${BOOTSTRAP}"
+export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go1.4"
 export CGO_ENABLED = "1"
 
 do_configure[noexec] = "1"
@@ -31,18 +33,18 @@ END
 }
 
 do_install() {
-	install -d ${D}${libdir}/go
-	cp -a ${B}/pkg ${D}${libdir}/go/
-	install -d ${D}${libdir}/go/src
+	install -d ${D}${libdir}/go${BOOTSTRAP}
+	cp -a ${B}/pkg ${D}${libdir}/go${BOOTSTRAP}/
+	install -d ${D}${libdir}/go${BOOTSTRAP}/src
 	(cd ${S}/src; for d in *; do \
-		[ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \
+		[ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go${BOOTSTRAP}/src/; \
 	done)
 
-	install -d ${D}${bindir} ${D}${libdir}/go/bin
+	install -d ${D}${bindir} ${D}${libdir}/go${BOOTSTRAP}/bin
 	for f in ${B}/bin/*
 	do
 		base=`basename $f`
-		install -m755 $f ${D}${libdir}/go/bin
+		install -m755 $f ${D}${libdir}/go${BOOTSTRAP}/bin
 		make_wrapper $base $base
 	done
 }
diff --git a/meta/recipes-devtools/go/go-native_1.4.bb b/meta/recipes-devtools/go/go-native_1.8.bb
similarity index 54%
rename from meta/recipes-devtools/go/go-native_1.4.bb
rename to meta/recipes-devtools/go/go-native_1.8.bb
index bbf3c0d..182fca2 100644
--- a/meta/recipes-devtools/go/go-native_1.4.bb
+++ b/meta/recipes-devtools/go/go-native_1.8.bb
@@ -1,2 +1,3 @@
 require ${PN}.inc
 require go-${PV}.inc
+DEPENDS += "go-bootstrap-native"
diff --git a/meta/recipes-devtools/go/go.inc b/meta/recipes-devtools/go/go.inc
index 1c94fc9..0b0cbf1 100644
--- a/meta/recipes-devtools/go/go.inc
+++ b/meta/recipes-devtools/go/go.inc
@@ -1,6 +1,6 @@
 inherit goarch
 # libgcc is required for the target specific libraries to build properly
-DEPENDS += " go-native libgcc"
+DEPENDS += "go-bootstrap-native libgcc"
 # Prevent runstrip from running because you get errors when the host arch != target arch
 INHIBIT_PACKAGE_STRIP = "1"
 INHIBIT_SYSROOT_STRIP = "1"
@@ -15,7 +15,7 @@ export GOHOSTARCH = "${BUILD_GOARCH}"
 export GOOS = "${TARGET_GOOS}"
 export GOARCH = "${TARGET_GOARCH}"
 export GOARM = "${TARGET_GOARM}"
-export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
+export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go1.4"
 export GOROOT_FINAL = "${libdir}/go"
 export CGO_ENABLED = "1"
 export CC_FOR_TARGET = "${CC}"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list