From 155ee00592d61537f1686be39fbd297c68b090a0 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Mon, 12 Jun 2023 18:33:19 +0200 Subject: [PATCH] libstd-rs, rust: use bfd linker instead of gold * it started to fail only after the upgrade to 1.70.0 (From OE-Core rev: aa037b4138459521a3554c5e91cb4a6cd0c37bdd) Signed-off-by: Martin Jansa Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- meta/recipes-devtools/rust/libstd-rs_1.70.0.bb | 5 +++++ meta/recipes-devtools/rust/rust_1.70.0.bb | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/meta/recipes-devtools/rust/libstd-rs_1.70.0.bb b/meta/recipes-devtools/rust/libstd-rs_1.70.0.bb index f4e5abc0cc..f23db79733 100644 --- a/meta/recipes-devtools/rust/libstd-rs_1.70.0.bb +++ b/meta/recipes-devtools/rust/libstd-rs_1.70.0.bb @@ -45,3 +45,8 @@ do_install () { } BBCLASSEXTEND = "nativesdk" + +# Since 1.70.0 upgrade this fails to build with gold: +# http://errors.yoctoproject.org/Errors/Details/708194/ +# ld: error: version script assignment of to symbol __rust_alloc_error_handler_should_panic failed: symbol not defined +LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd', '', d)}" diff --git a/meta/recipes-devtools/rust/rust_1.70.0.bb b/meta/recipes-devtools/rust/rust_1.70.0.bb index 83f9bec68a..8669291d08 100644 --- a/meta/recipes-devtools/rust/rust_1.70.0.bb +++ b/meta/recipes-devtools/rust/rust_1.70.0.bb @@ -350,3 +350,8 @@ RUSTLIB_DEP:class-nativesdk = "" INSANE_SKIP:${PN} = "staticdev" BBCLASSEXTEND = "native nativesdk" + +# Since 1.70.0 upgrade this fails to build with gold: +# http://errors.yoctoproject.org/Errors/Details/708196/ +# ld: error: version script assignment of to symbol __rust_alloc_error_handler_should_panic failed: symbol not defined +LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd', '', d)}"