mirror of
https://git.yoctoproject.org/poky
synced 2026-09-25 07:36:23 +02:00
go: add native recipes for 1.8
(From OE-Core rev: 13a5c3dac4b5b0ccb4c5dfebf79b468acd8e1983) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
3
meta/recipes-devtools/go/go-bootstrap-native_1.4.bb
Normal file
3
meta/recipes-devtools/go/go-bootstrap-native_1.4.bb
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
BOOTSTRAP = "1.4"
|
||||||
|
require go-native.inc
|
||||||
|
require go-${PV}.inc
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
inherit native
|
inherit native
|
||||||
|
|
||||||
|
BOOTSTRAP ?= ""
|
||||||
export GOOS = "${BUILD_GOOS}"
|
export GOOS = "${BUILD_GOOS}"
|
||||||
export GOARCH = "${BUILD_GOARCH}"
|
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"
|
export CGO_ENABLED = "1"
|
||||||
|
|
||||||
do_configure[noexec] = "1"
|
do_configure[noexec] = "1"
|
||||||
@@ -31,18 +33,18 @@ END
|
|||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
install -d ${D}${libdir}/go
|
install -d ${D}${libdir}/go${BOOTSTRAP}
|
||||||
cp -a ${B}/pkg ${D}${libdir}/go/
|
cp -a ${B}/pkg ${D}${libdir}/go${BOOTSTRAP}/
|
||||||
install -d ${D}${libdir}/go/src
|
install -d ${D}${libdir}/go${BOOTSTRAP}/src
|
||||||
(cd ${S}/src; for d in *; do \
|
(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)
|
done)
|
||||||
|
|
||||||
install -d ${D}${bindir} ${D}${libdir}/go/bin
|
install -d ${D}${bindir} ${D}${libdir}/go${BOOTSTRAP}/bin
|
||||||
for f in ${B}/bin/*
|
for f in ${B}/bin/*
|
||||||
do
|
do
|
||||||
base=`basename $f`
|
base=`basename $f`
|
||||||
install -m755 $f ${D}${libdir}/go/bin
|
install -m755 $f ${D}${libdir}/go${BOOTSTRAP}/bin
|
||||||
make_wrapper $base $base
|
make_wrapper $base $base
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
require ${PN}.inc
|
require ${PN}.inc
|
||||||
require go-${PV}.inc
|
require go-${PV}.inc
|
||||||
|
DEPENDS += "go-bootstrap-native"
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
inherit goarch
|
inherit goarch
|
||||||
# libgcc is required for the target specific libraries to build properly
|
# 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
|
# Prevent runstrip from running because you get errors when the host arch != target arch
|
||||||
INHIBIT_PACKAGE_STRIP = "1"
|
INHIBIT_PACKAGE_STRIP = "1"
|
||||||
INHIBIT_SYSROOT_STRIP = "1"
|
INHIBIT_SYSROOT_STRIP = "1"
|
||||||
@@ -15,7 +15,7 @@ export GOHOSTARCH = "${BUILD_GOARCH}"
|
|||||||
export GOOS = "${TARGET_GOOS}"
|
export GOOS = "${TARGET_GOOS}"
|
||||||
export GOARCH = "${TARGET_GOARCH}"
|
export GOARCH = "${TARGET_GOARCH}"
|
||||||
export GOARM = "${TARGET_GOARM}"
|
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 GOROOT_FINAL = "${libdir}/go"
|
||||||
export CGO_ENABLED = "1"
|
export CGO_ENABLED = "1"
|
||||||
export CC_FOR_TARGET = "${CC}"
|
export CC_FOR_TARGET = "${CC}"
|
||||||
|
|||||||
Reference in New Issue
Block a user