]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
rust: Add linker configurations for cross compilation
authorpgowda <pgowda.cve@gmail.com>
Sun, 4 Sep 2022 07:04:03 +0000 (12:34 +0530)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 5 Sep 2022 11:54:50 +0000 (12:54 +0100)
Adds the cross compilation linker for build, host and target.
Ensure the main rust config has the appropriate sections added
to match the configurations.

Signed-off-by: pgowda <pgowda.cve@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/rust/rust.inc

index 284347dedc37070677bf8e95dd02627d5eb32352..afbda2cb199cbd67057cf89dcefbea34435bbe1d 100644 (file)
@@ -81,6 +81,7 @@ python do_configure() {
 
     config.set(host_section, "cxx", e(d.expand("${RUST_TARGET_CXX}")))
     config.set(host_section, "cc", e(d.expand("${RUST_TARGET_CC}")))
+    config.set(host_section, "linker", e(d.expand("${RUST_TARGET_CCLD}")))
     if "musl" in host_section:
         config.set(host_section, "musl-root", e(d.expand("${STAGING_DIR_HOST}${exec_prefix}")))
 
@@ -94,6 +95,7 @@ python do_configure() {
 
         config.set(build_section, "cxx", e(d.expand("${RUST_BUILD_CXX}")))
         config.set(build_section, "cc", e(d.expand("${RUST_BUILD_CC}")))
+        config.set(build_section, "linker", e(d.expand("${RUST_BUILD_CCLD}")))
 
     target_section = "target.{}".format(d.getVar('RUST_TARGET_SYS', True))
     if target_section != host_section and target_section != build_section:
@@ -103,6 +105,7 @@ python do_configure() {
 
         config.set(target_section, "cxx", e(d.expand("${RUST_TARGET_CXX}")))
         config.set(target_section, "cc", e(d.expand("${RUST_TARGET_CC}")))
+        config.set(target_section, "linker", e(d.expand("${RUST_TARGET_CCLD}")))
 
     # [llvm]
     config.add_section("llvm")