mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-12-15 06:35:42 +01:00
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>
This commit is contained in:
parent
58bc830e73
commit
d866c439cb
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user