summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2016-09-28 13:14:54 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2016-10-12 19:10:44 -0400
commitd866c439cb11d1070f169a5385071dc9a6f8b13b (patch)
treec8a282099ffa631efa53da2dbc9dd973737bbeee
parent58bc830e732a694ddbdfef8f548387f715bb013c (diff)
downloadmeta-virtualization-d866c439cb11d1070f169a5385071dc9a6f8b13b.tar.gz
containerd: use the target toolchain to build cgo components
We need to ensure we are using the target toolchain and sysroot to avoid possible host contamination, and in the case of non x86-64 target builds, allow the build to complete successfully. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r--recipes-containers/containerd/containerd_git.bb2
1 files changed, 2 insertions, 0 deletions
diff --git a/recipes-containers/containerd/containerd_git.bb b/recipes-containers/containerd/containerd_git.bb
index 24a51bc4..ca99e558 100644
--- a/recipes-containers/containerd/containerd_git.bb
+++ b/recipes-containers/containerd/containerd_git.bb
@@ -53,6 +53,8 @@ do_compile() {
53 export LDFLAGS="" 53 export LDFLAGS=""
54 export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}" 54 export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
55 export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" 55 export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
56 export CC_FOR_TARGET="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
57 export CXX_FOR_TARGET="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
56 58
57 oe_runmake static 59 oe_runmake static
58} 60}