On 2023-01-09 08:40, Yash Shinde wrote:
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
Drop the line above, it's only used internally for WR Linux.
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
Drop the line above, it's only used internally for WR Linux.
We also need an upstream status.
If you haven't done so already please find and report or
create a new upstream issue to track this problem and include
it as part of the Upstream-Status:
https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded
->
https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines#Patch_Header_Recommendations:_Upstream-Status
Note that the Upstream-Status is mandatory for oe-core.
../Randy
+
+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}"
--
# Randy MacLeod
# Wind River Linux
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#175691):
https://lists.openembedded.org/g/openembedded-core/message/175691
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]]
-=-=-=-=-=-=-=-=-=-=-=-