]> code.ossystems Code Review - openembedded-core.git/commitdiff
go: add native recipes for 1.8
authorKhem Raj <raj.khem@gmail.com>
Mon, 13 Mar 2017 19:57:37 +0000 (12:57 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 14 Mar 2017 14:39:04 +0000 (14:39 +0000)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/go/go-bootstrap-native_1.4.bb [new file with mode: 0644]
meta/recipes-devtools/go/go-native.inc
meta/recipes-devtools/go/go-native_1.8.bb [moved from meta/recipes-devtools/go/go-native_1.4.bb with 54% similarity]
meta/recipes-devtools/go/go.inc

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 (file)
index 0000000..3d4141e
--- /dev/null
@@ -0,0 +1,3 @@
+BOOTSTRAP = "1.4"
+require go-native.inc
+require go-${PV}.inc
index 89bc63459dbcc27970cf51350ed7997a0dc15989..c1ada5121a8a2edd8bb4ace9d279e3a9946219f6 100644 (file)
@@ -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
 }
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 bbf3c0dd737026a61bcdb28ff5fb7aa3dd6e9220..182fca27a05e712bfcfdc2a5f4719e58d6d26d24 100644 (file)
@@ -1,2 +1,3 @@
 require ${PN}.inc
 require go-${PV}.inc
+DEPENDS += "go-bootstrap-native"
index 1c94fc9c34fce17ca58380744959987152dcb0c4..0b0cbf19ad64e075966f7c8183b5c715ac5ef09c 100644 (file)
@@ -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}"