summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/cargo_common.bbclass9
-rw-r--r--meta/recipes-devtools/rust/rust.inc3
2 files changed, 9 insertions, 3 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
diff --git a/meta/recipes-devtools/rust/rust.inc b/meta/recipes-devtools/rust/rust.inc
index 5730887411..12c86e02c4 100644
--- a/meta/recipes-devtools/rust/rust.inc
+++ b/meta/recipes-devtools/rust/rust.inc
@@ -29,9 +29,6 @@ setup_cargo_environment () {
29 # x86_64-unknown-linux-gnu. 29 # x86_64-unknown-linux-gnu.
30 # Later stages are build for the native target (i.e. target.x86_64-linux) 30 # Later stages are build for the native target (i.e. target.x86_64-linux)
31 cargo_common_do_configure 31 cargo_common_do_configure
32
33 printf '[target.%s]\n' "${RUST_BUILD_SYS}" >> ${CARGO_HOME}/config
34 printf "linker = '%s'\n" "${RUST_BUILD_CCLD}" >> ${CARGO_HOME}/config
35} 32}
36 33
37inherit rust-target-config 34inherit rust-target-config