diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-05 13:29:09 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-08 15:41:36 +0100 |
commit | 0dc9635c28c269f782ad4ed6ea06b4e4de1beb8e (patch) | |
tree | 71f810393b3e9683de3575f4420339ad21d1c380 /meta/classes | |
parent | d02c28b2219d736c9598a13fead7a03eaa3256a6 (diff) | |
download | openembedded-core-contrib-0dc9635c28c269f782ad4ed6ea06b4e4de1beb8e.tar.gz |
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/cargo_common.bbclass | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/classes/cargo_common.bbclass b/meta/classes/cargo_common.bbclass index dcd0afd980..4a419cdd0a 100644 --- a/meta/classes/cargo_common.bbclass +++ b/meta/classes/cargo_common.bbclass @@ -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 |