From: Sunil Dora <[email protected]>

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 <[email protected]>
---
 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

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#232201): 
https://lists.openembedded.org/g/openembedded-core/message/232201
Mute This Topic: https://lists.openembedded.org/mt/118093064/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to