* [PATCH] Build libstd-rs in release mode to compile mozjs
@ 2021-12-06 5:45 pgowda
2021-12-06 8:20 ` Alexander Kanavin
0 siblings, 1 reply; 3+ messages in thread
From: pgowda @ 2021-12-06 5:45 UTC (permalink / raw)
To: openembedded-core
Cc: richard.purdie, rwmacleod, alex.kanavin, umesh.kalappa0, pgowda
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.
Signed-off-by: pgowda <pgowda.cve@gmail.com>
---
meta/recipes-devtools/rust/libstd-rs.inc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta/recipes-devtools/rust/libstd-rs.inc b/meta/recipes-devtools/rust/libstd-rs.inc
index 987956344a..96eaa2bdc0 100644
--- a/meta/recipes-devtools/rust/libstd-rs.inc
+++ b/meta/recipes-devtools/rust/libstd-rs.inc
@@ -19,9 +19,12 @@ RUSTFLAGS += "-L ${STAGING_LIBDIR} -C link-arg=-Wl,-soname,libstd.so"
S = "${RUSTSRC}/src/libstd"
+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.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] Build libstd-rs in release mode to compile mozjs
2021-12-06 5:45 [PATCH] Build libstd-rs in release mode to compile mozjs pgowda
@ 2021-12-06 8:20 ` Alexander Kanavin
2021-12-08 1:51 ` [OE-core] " Randy MacLeod
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Kanavin @ 2021-12-06 8:20 UTC (permalink / raw)
To: pgowda; +Cc: OE-core, Richard Purdie, Randy MacLeod, umesh kalappa0
[-- Attachment #1: Type: text/plain, Size: 725 bytes --]
On Mon, 6 Dec 2021 at 06:45, pgowda <pgowda.cve@gmail.com> 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.
>
Thank you, but I think the problem needs to be properly understood before
any fix to oe-core is merged. Can you keep the workaround as a bbappend
until then?
Alex
[-- Attachment #2: Type: text/html, Size: 1181 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [OE-core] [PATCH] Build libstd-rs in release mode to compile mozjs
2021-12-06 8:20 ` Alexander Kanavin
@ 2021-12-08 1:51 ` Randy MacLeod
0 siblings, 0 replies; 3+ messages in thread
From: Randy MacLeod @ 2021-12-08 1:51 UTC (permalink / raw)
To: Alexander Kanavin, pgowda, Khem Raj
Cc: OE-core, Richard Purdie, Randy MacLeod, umesh kalappa0
On 2021-12-06 3:20 a.m., Alexander Kanavin wrote:
> On Mon, 6 Dec 2021 at 06:45, pgowda <pgowda.cve@gmail.com
> <mailto:pgowda.cve@gmail.com>> 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
> <http://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.
>
>
> Thank you, but I think the problem needs to be properly understood
> before any fix to oe-core is merged. Can you keep the workaround as a
> bbappend until then?
That's fine. We (WR) have this as an open bug so Naveen will
work on getting to the root cause.
CCing Khem in case he want's the work-around in meta-oe.
../Randy
>
> Alex
>
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#159212): https://lists.openembedded.org/g/openembedded-core/message/159212
> Mute This Topic: https://lists.openembedded.org/mt/87534858/3616765
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [randy.macleod@windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
--
# Randy MacLeod
# Wind River Linux
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-08 1:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-06 5:45 [PATCH] Build libstd-rs in release mode to compile mozjs pgowda
2021-12-06 8:20 ` Alexander Kanavin
2021-12-08 1:51 ` [OE-core] " Randy MacLeod
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox