From: pgowda.cve@gmail.com
To: openembedded-core@lists.openembedded.org
Cc: richard.purdie@linuxfoundation.org, Randy.MacLeod@windriver.com,
vinay.m.engg@gmail.com, pgowda <pgowda.cve@gmail.com>
Subject: [PATCH] rust: Add linker configurations for cross compilation
Date: Sun, 4 Sep 2022 12:34:03 +0530 [thread overview]
Message-ID: <20220904070403.2706101-1-pgowda.cve@gmail.com> (raw)
From: pgowda <pgowda.cve@gmail.com>
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>
---
meta/recipes-devtools/rust/rust.inc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta/recipes-devtools/rust/rust.inc b/meta/recipes-devtools/rust/rust.inc
index 284347dedc..20fd797a90 100644
--- a/meta/recipes-devtools/rust/rust.inc
+++ b/meta/recipes-devtools/rust/rust.inc
@@ -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")
--
2.25.1
next reply other threads:[~2022-09-04 7:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-04 7:04 pgowda.cve [this message]
2022-09-04 13:36 ` [PATCH] rust: Add linker configurations for cross compilation Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220904070403.2706101-1-pgowda.cve@gmail.com \
--to=pgowda.cve@gmail.com \
--cc=Randy.MacLeod@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=richard.purdie@linuxfoundation.org \
--cc=vinay.m.engg@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox