* [PATCH] rust: Add linker configurations for cross compilation
@ 2022-09-04 7:04 pgowda.cve
2022-09-04 13:36 ` Richard Purdie
0 siblings, 1 reply; 2+ messages in thread
From: pgowda.cve @ 2022-09-04 7:04 UTC (permalink / raw)
To: openembedded-core; +Cc: richard.purdie, Randy.MacLeod, vinay.m.engg, pgowda
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rust: Add linker configurations for cross compilation
2022-09-04 7:04 [PATCH] rust: Add linker configurations for cross compilation pgowda.cve
@ 2022-09-04 13:36 ` Richard Purdie
0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2022-09-04 13:36 UTC (permalink / raw)
To: pgowda.cve, openembedded-core; +Cc: Randy.MacLeod, vinay.m.engg
On Sun, 2022-09-04 at 12:34 +0530, pgowda.cve@gmail.com wrote:
> 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:
Your mailer somehow converted 8 spaces to a tab above. In the interests
of moving forward, I'll fix this one up and test it.
Cheers,
Richard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-04 13:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-04 7:04 [PATCH] rust: Add linker configurations for cross compilation pgowda.cve
2022-09-04 13:36 ` Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.