summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rust/rust.inc
diff options
context:
space:
mode:
authorpgowda <pgowda.cve@gmail.com>2022-09-04 12:34:03 +0530
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-09-05 12:55:09 +0100
commit2b24fd87895ae926d7deda1ba0c825ad42475c9b (patch)
treed97b198a74bc8f06cb614b7f7c7fac8be26f120b /meta/recipes-devtools/rust/rust.inc
parenta1608592c8e292774b8fd2ea9fdf3fdb4c8e9b89 (diff)
downloadpoky-2b24fd87895ae926d7deda1ba0c825ad42475c9b.tar.gz
rust: Add linker configurations for cross compilation
Adds the cross compilation linker for build, host and target. Ensure the main rust config has the appropriate sections added to match the configurations. (From OE-Core rev: 02133f92c56c90a5365985b515953e4136e112aa) Signed-off-by: pgowda <pgowda.cve@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rust/rust.inc')
-rw-r--r--meta/recipes-devtools/rust/rust.inc3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rust/rust.inc b/meta/recipes-devtools/rust/rust.inc
index 284347dedc..afbda2cb19 100644
--- a/meta/recipes-devtools/rust/rust.inc
+++ b/meta/recipes-devtools/rust/rust.inc
@@ -81,6 +81,7 @@ python do_configure() {
81 81
82 config.set(host_section, "cxx", e(d.expand("${RUST_TARGET_CXX}"))) 82 config.set(host_section, "cxx", e(d.expand("${RUST_TARGET_CXX}")))
83 config.set(host_section, "cc", e(d.expand("${RUST_TARGET_CC}"))) 83 config.set(host_section, "cc", e(d.expand("${RUST_TARGET_CC}")))
84 config.set(host_section, "linker", e(d.expand("${RUST_TARGET_CCLD}")))
84 if "musl" in host_section: 85 if "musl" in host_section:
85 config.set(host_section, "musl-root", e(d.expand("${STAGING_DIR_HOST}${exec_prefix}"))) 86 config.set(host_section, "musl-root", e(d.expand("${STAGING_DIR_HOST}${exec_prefix}")))
86 87
@@ -94,6 +95,7 @@ python do_configure() {
94 95
95 config.set(build_section, "cxx", e(d.expand("${RUST_BUILD_CXX}"))) 96 config.set(build_section, "cxx", e(d.expand("${RUST_BUILD_CXX}")))
96 config.set(build_section, "cc", e(d.expand("${RUST_BUILD_CC}"))) 97 config.set(build_section, "cc", e(d.expand("${RUST_BUILD_CC}")))
98 config.set(build_section, "linker", e(d.expand("${RUST_BUILD_CCLD}")))
97 99
98 target_section = "target.{}".format(d.getVar('RUST_TARGET_SYS', True)) 100 target_section = "target.{}".format(d.getVar('RUST_TARGET_SYS', True))
99 if target_section != host_section and target_section != build_section: 101 if target_section != host_section and target_section != build_section:
@@ -103,6 +105,7 @@ python do_configure() {
103 105
104 config.set(target_section, "cxx", e(d.expand("${RUST_TARGET_CXX}"))) 106 config.set(target_section, "cxx", e(d.expand("${RUST_TARGET_CXX}")))
105 config.set(target_section, "cc", e(d.expand("${RUST_TARGET_CC}"))) 107 config.set(target_section, "cc", e(d.expand("${RUST_TARGET_CC}")))
108 config.set(target_section, "linker", e(d.expand("${RUST_TARGET_CCLD}")))
106 109
107 # [llvm] 110 # [llvm]
108 config.add_section("llvm") 111 config.add_section("llvm")