public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: sunilkumar.dora@windriver.com
To: openembedded-core@lists.openembedded.org
Cc: Sundeep.Kokkonda@windriver.com, sunilkumar.dora@windriver.com
Subject: [PATCH] rust: Enable dynamic LLVM linking for nativesdk-rust
Date: Mon,  2 Mar 2026 05:28:15 -0800	[thread overview]
Message-ID: <20260302132815.2922014-1-sunilkumar.dora@windriver.com> (raw)

From: Sunil Dora <sunilkumar.dora@windriver.com>

Fixes [Yocto #16058]

The issue is still observed with nativesdk-rust when sstate artifacts
built with different host toolchain versions are reused.

Although dynamic LLVM linking was already enabled for rust-native,
nativesdk-rust can also reuse sstate artifacts across host toolchain
generations. In such cases, static linking of LLVM objects may result
in mixing objects built with different toolchains, leading to runtime
segmentation faults.

Extend the fix to nativesdk-rust by enabling dynamic LLVM linking
(link-shared = true) to avoid these crashes.

Signed-off-by: Sunil Dora <sunilkumar.dora@windriver.com>
---
 meta/recipes-devtools/rust/rust_1.93.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/rust/rust_1.93.0.bb b/meta/recipes-devtools/rust/rust_1.93.0.bb
index 2be0bd8d89..06dc8a376c 100644
--- a/meta/recipes-devtools/rust/rust_1.93.0.bb
+++ b/meta/recipes-devtools/rust/rust_1.93.0.bb
@@ -124,7 +124,7 @@ python do_configure() {
 
     # [llvm]
     config.add_section("llvm")
-    if d.getVar('PN') == "rust-native":
+    if d.getVar('PN') in ("rust-native", "nativesdk-rust"):
         config.set("llvm", "link-shared", e(True))
     config.set("llvm", "static-libstdcpp", e(False))
     config.set("llvm", "download-ci-llvm", e(False))
-- 
2.49.0



             reply	other threads:[~2026-03-02 13:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-02 13:28 sunilkumar.dora [this message]
2026-03-05 11:32 ` [OE-core] [PATCH] rust: Enable dynamic LLVM linking for nativesdk-rust Alexander Kanavin
2026-03-11 13:46   ` Dora, Sunil Kumar
2026-03-11 16:26     ` Alexander Kanavin
2026-03-12 13:02       ` Dora, Sunil Kumar
     [not found] ` <1899EEAA854579E5.971272@lists.openembedded.org>
2026-03-10 18:15   ` [OE-core] " Alexander Kanavin

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=20260302132815.2922014-1-sunilkumar.dora@windriver.com \
    --to=sunilkumar.dora@windriver.com \
    --cc=Sundeep.Kokkonda@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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