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:44:20 +0100 |
commit | 1ab2fd2d036e93bff84a78a85acc04a240ee5d07 (patch) | |
tree | d1028fc5349bf566507396b6f6717e93ee5d0117 /meta/classes | |
parent | 1c8444bd380d8caff4f09a02af2c15be928f5ae6 (diff) | |
download | poky-1ab2fd2d036e93bff84a78a85acc04a240ee5d07.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.
(From OE-Core rev: 0dc9635c28c269f782ad4ed6ea06b4e4de1beb8e)
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 () { | |||
82 | EOF | 82 | EOF |
83 | fi | 83 | fi |
84 | 84 | ||
85 | if [ "${RUST_TARGET_SYS}" != "${RUST_BUILD_SYS}" -a "${RUST_TARGET_SYS}" != "${RUST_HOST_SYS}"]; then | ||
86 | cat <<- EOF >> ${CARGO_HOME}/config | ||
87 | |||
88 | # TARGET_SYS | ||
89 | [target.${RUST_TARGET_SYS}] | ||
90 | linker = "${RUST_TARGET_CCLD}" | ||
91 | EOF | ||
92 | fi | ||
93 | |||
85 | # Put build output in build directory preferred by bitbake instead of | 94 | # Put build output in build directory preferred by bitbake instead of |
86 | # inside source directory unless they are the same | 95 | # inside source directory unless they are the same |
87 | if [ "${B}" != "${S}" ]; then | 96 | if [ "${B}" != "${S}" ]; then |