From d866c439cb11d1070f169a5385071dc9a6f8b13b Mon Sep 17 00:00:00 2001 From: Mark Asselstine Date: Wed, 28 Sep 2016 13:14:54 -0400 Subject: 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 Signed-off-by: Bruce Ashfield --- recipes-containers/containerd/containerd_git.bb | 2 ++ 1 file changed, 2 insertions(+) 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() { export LDFLAGS="" export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}" export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" + export CC_FOR_TARGET="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}" + export CXX_FOR_TARGET="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}" oe_runmake static } -- cgit v1.2.3-54-g00ecf