When mozjs in firefox is built with DEBUG_BUILD = "1" in local.conf, it will fail with the following error: rustc-1.56.0-src/vendor/compiler_builtins/src/int/specialized_div_rem /asymmetric.rs:57: more undefined references to `core::panicking::panic' follow
Switch to building libstd-rs in "release" mode as that works around the issue and builds mozjs successfully. This is a work-around that can be used until the root cause of the debug build error is resolved. (LOCAL REV: NOT UPSTREAM) -- to be sent to oe-core Signed-off-by: Yash Shinde <[email protected]> --- .../rust/rust/LINCD-11387.patch | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 meta/recipes-devtools/rust/rust/LINCD-11387.patch diff --git a/meta/recipes-devtools/rust/rust/LINCD-11387.patch b/meta/recipes-devtools/rust/rust/LINCD-11387.patch new file mode 100644 index 0000000000..3e84aa7232 --- /dev/null +++ b/meta/recipes-devtools/rust/rust/LINCD-11387.patch @@ -0,0 +1,43 @@ +From 45731fb0f735bc287e56b6fd6c93b56966195647 Mon Sep 17 00:00:00 2001 +From: naveen gowda <[email protected]> +Date: Mon, 29 Nov 2021 21:40:27 -0800 +Subject: libstd-rs: Build in the release mode to avoid error + +Issue: LINCD-7172 + +When mozjs in firefox is built with DEBUG_BUILD = "1" +in local.conf, it will fail with the following error: + rustc-1.56.0-src/vendor/compiler_builtins/src/int/specialized_div_rem +/asymmetric.rs:57: + more undefined references to `core::panicking::panic' follow + +Switch to building libstd-rs in "release" mode as that works +around the issue and builds mozjs successfully. This is a +work-around that can be used until the root cause of the debug +build error is resolved. + +(LOCAL REV: NOT UPSTREAM) -- to be sent to oe-core + +Signed-off-by: naveen gowda <[email protected]> +Signed-off-by: Randy MacLeod <[email protected]> +--- +meta/recipes-devtools/rust/libstd-rs_1.66.0.bb | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/meta/recipes-devtools/rust/libstd-rs_1.66.0.bb b/meta/recipes-devtools/rust/libstd-rs_1.66.0.bb +index 8802e9790c..c5295187f8 100644 +--- a/meta/recipes-devtools/rust/libstd-rs_1.66.0.bb ++++ b/meta/recipes-devtools/rust/libstd-rs_1.66.0.bb +@@ -24,9 +24,12 @@ RUSTFLAGS += "-Cembed-bitcode=yes" + # Needed so cargo can find libbacktrace + RUSTFLAGS += "-L ${STAGING_LIBDIR} -C link-arg=-Wl,-soname,libstd.so" + ++CARGO_BUILD_FLAGS:append = "${@' --release' if d.getVar('DEBUG_BUILD') == '1' else ''}" ++ + CARGO_FEATURES ?= "panic-unwind backtrace" + CARGO_BUILD_FLAGS += "--features '${CARGO_FEATURES}'" + CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor" ++BUILD_DIR = "release" + + do_compile:prepend () { + export CARGO_TARGET_DIR="${B}" -- 2.25.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#175685): https://lists.openembedded.org/g/openembedded-core/message/175685 Mute This Topic: https://lists.openembedded.org/mt/96152544/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
