From: Sunil Dora <[email protected]> YOCTO #16058
When llvm-native is built with a newer toolchain (e.g. GCC 15) and reused on a system with an older linker, rustc emit segfault at runtime. This issue occurs because rustc, which is statically linked with LLVM libraries, was built on one machine using a newer toolchain and then executed on another machine that has an older linker. To prevent crash, LLVM now linked with rustc dynamically. Added llvm as dependency to provide libllvm.so at runtime. Signed-off-by: Sunil Dora <[email protected]> Signed-off-by: Alexander Kanavin <[email protected]> Signed-off-by: Deepesh Varatharajan <[email protected]> --- meta/lib/oeqa/selftest/cases/rust.py | 2 +- meta/recipes-devtools/rust/rust_1.93.0.bb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/lib/oeqa/selftest/cases/rust.py b/meta/lib/oeqa/selftest/cases/rust.py index 3ae1946e43..7614941661 100644 --- a/meta/lib/oeqa/selftest/cases/rust.py +++ b/meta/lib/oeqa/selftest/cases/rust.py @@ -47,7 +47,7 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase): bitbake("{} -c test_compile".format(recipe)) builddir = get_bb_var("RUSTSRC", "rust") # build core-image-minimal with required packages - default_installed_packages = ["libgcc", "libstdc++", "libatomic", "libgomp", "libzstd", "openssl"] + default_installed_packages = ["libgcc", "libstdc++", "libatomic", "libgomp", "libzstd", "llvm", "openssl"] features = [] features.append('IMAGE_FEATURES += "ssh-server-dropbear"') features.append('CORE_IMAGE_EXTRA_INSTALL += "{0}"'.format(" ".join(default_installed_packages))) diff --git a/meta/recipes-devtools/rust/rust_1.93.0.bb b/meta/recipes-devtools/rust/rust_1.93.0.bb index a25f65f674..cfee48ec78 100644 --- a/meta/recipes-devtools/rust/rust_1.93.0.bb +++ b/meta/recipes-devtools/rust/rust_1.93.0.bb @@ -124,6 +124,7 @@ python do_configure() { # [llvm] config.add_section("llvm") + config.set("llvm", "link-shared", e(True)) config.set("llvm", "static-libstdcpp", e(False)) config.set("llvm", "download-ci-llvm", e(False)) if "llvm" in (d.getVar('TC_CXX_RUNTIME') or ""): -- 2.49.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#231048): https://lists.openembedded.org/g/openembedded-core/message/231048 Mute This Topic: https://lists.openembedded.org/mt/117777483/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
