From ab373099f54d2dd32882359a4c57bc26a17e5b76 Mon Sep 17 00:00:00 2001 From: Lans Zhang Date: Sat, 21 Jan 2017 13:37:53 +0800 Subject: containered|runc: override GOROOT at build time Similar to commit 01aa8f1, runc and containered also need to set GOROOT explicitly. Signed-off-by: Lans Zhang Signed-off-by: Bruce Ashfield --- recipes-containers/containerd/containerd_git.bb | 1 + recipes-containers/runc/runc_git.bb | 1 + 2 files changed, 2 insertions(+) diff --git a/recipes-containers/containerd/containerd_git.bb b/recipes-containers/containerd/containerd_git.bb index ca99e558..096a164c 100644 --- a/recipes-containers/containerd/containerd_git.bb +++ b/recipes-containers/containerd/containerd_git.bb @@ -44,6 +44,7 @@ do_compile() { mkdir -p .gopath/src/"$(dirname "${CONTAINERD_PKG}")" ln -sf ../../../.. .gopath/src/"${CONTAINERD_PKG}" export GOPATH="${S}/.gopath:${S}/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go" + export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" cd - # Pass the needed cflags/ldflags so that cgo diff --git a/recipes-containers/runc/runc_git.bb b/recipes-containers/runc/runc_git.bb index 905a751b..ed9a32e4 100644 --- a/recipes-containers/runc/runc_git.bb +++ b/recipes-containers/runc/runc_git.bb @@ -43,6 +43,7 @@ do_compile() { (cd .gopath/src/${dname}; ln -sf ../../../../../${bname} ${bname}) export GOPATH="${S}/.gopath:${S}/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go" + export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" cd - # Pass the needed cflags/ldflags so that cgo -- cgit v1.2.3-54-g00ecf