summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoann Congal <yoann.congal@smile.fr>2025-05-08 18:13:53 +0200
committerKhem Raj <raj.khem@gmail.com>2025-05-08 09:34:46 -0700
commit6cf005f38654ca014377e08c770c11e2505d65a3 (patch)
tree18211c88079accce29cded549767d31ba8084d1a
parent817e5876a2b21ca73d02ae7d54729b55b6ef4e9f (diff)
downloadmeta-openembedded-6cf005f38654ca014377e08c770c11e2505d65a3.tar.gz
mozjs-128: inherit cargo to fix build on rustup systems
mozjs build uses cargo deep in the build tree. The configure step tries to find the cargo home and forcibly start with the home rustup directory (~/.cargo) when not found. This leads to the build partially using rustup cargo and to a build error when this cargo version is not compatible with the OE-Core one. To fix this, inherit cargo to inherit a working cargo environment (e.g. CARGO_HOME). But, override do_compile to keep the previous (base/Makefile) task. Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb9
1 files changed, 8 insertions, 1 deletions
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb b/meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb
index 6bcbb13501..c3804ec64d 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb
+++ b/meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb
@@ -24,7 +24,7 @@ UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)"
24 24
25S = "${WORKDIR}/firefox-${PV}" 25S = "${WORKDIR}/firefox-${PV}"
26 26
27inherit pkgconfig perlnative python3native rust 27inherit pkgconfig perlnative python3native rust cargo
28 28
29DEPENDS += "zlib cbindgen-native python3 icu" 29DEPENDS += "zlib cbindgen-native python3 icu"
30DEPENDS:remove:mipsarch = "icu" 30DEPENDS:remove:mipsarch = "icu"
@@ -83,6 +83,13 @@ do_configure() {
83} 83}
84do_configure[cleandirs] += "${B}" 84do_configure[cleandirs] += "${B}"
85 85
86# The main build system is a Makefile that call cargo downstream.
87# We inherit cargo to get the environnement but need to switch back to
88# base_do_compile to do the Makefile base compilation.
89do_compile() {
90 base_do_compile
91}
92
86do_install() { 93do_install() {
87 oe_runmake 'DESTDIR=${D}' install 94 oe_runmake 'DESTDIR=${D}' install
88} 95}