1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-09 05:29:32 +00:00

cargo_common: Handle build SYS as well as HOST/TARGET

Improve the common class to handle BUILD_SYS as well as host and target,
removing the need to a workaround in the rust recipe.

(From OE-Core rev: 0dc9635c28c269f782ad4ed6ea06b4e4de1beb8e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2022-08-05 13:29:09 +01:00
parent 1c8444bd38
commit 1ab2fd2d03
2 changed files with 9 additions and 3 deletions
+9
View File
@@ -82,6 +82,15 @@ cargo_common_do_configure () {
EOF
fi
if [ "${RUST_TARGET_SYS}" != "${RUST_BUILD_SYS}" -a "${RUST_TARGET_SYS}" != "${RUST_HOST_SYS}"]; then
cat <<- EOF >> ${CARGO_HOME}/config
# TARGET_SYS
[target.${RUST_TARGET_SYS}]
linker = "${RUST_TARGET_CCLD}"
EOF
fi
# Put build output in build directory preferred by bitbake instead of
# inside source directory unless they are the same
if [ "${B}" != "${S}" ]; then