Message ID | 20250318032001.2031160-1-soumya.sambu@windriver.com |
---|---|
State | New |
Headers | show |
Series | [meta-lts-mixins,kirkstone/rust,1/1] mozjs: Use RUST_HOST_SYS and RUST_TARGET_SYS | expand |
I think these files should be in dynamic-layers folder, as rust-mixin depends only on oe-core. Otherwise it will complain about dangling bbappends if meta-oe and/or meta-python layers are not present. Maybe meta-oe would be an even better place for these bbappends, also in dynamic-layers folders, depending on this mixin layer. (Though that part is just an idea) On 3/18/25 04:20, Soumya via lists.yoctoproject.org wrote: > From: Soumya Sambu <soumya.sambu@windriver.com> > > The mozjs-91 and mozjs-78 recipe in meta-openembedded sets --target=${HOST_SYS} and > --target=${TARGET_SYS} respectively, which leads to an error when using Rust from meta-lts-mixins: > > error: Error loading target specification: Could not find specification for target "x86_64-poky-linux". > > Updated target configuration to resolve this. > > Additionally, `mozjs-78` encountered "linker 'cc' not found" error. This was fixed by explicitly > defining the linker for Rust. > > Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com> > --- > recipes-devtools/rust/rust_1.81.0.bb | 3 +++ > recipes-extended/mozjs/mozjs-78_%.bbappend | 14 ++++++++++++++ > recipes-extended/mozjs/mozjs-91_%.bbappend | 13 +++++++++++++ > 3 files changed, 30 insertions(+) > create mode 100644 recipes-extended/mozjs/mozjs-78_%.bbappend > create mode 100644 recipes-extended/mozjs/mozjs-91_%.bbappend > > diff --git a/recipes-devtools/rust/rust_1.81.0.bb b/recipes-devtools/rust/rust_1.81.0.bb > index cc00053..2d91d68 100644 > --- a/recipes-devtools/rust/rust_1.81.0.bb > +++ b/recipes-devtools/rust/rust_1.81.0.bb > @@ -146,6 +146,9 @@ python do_configure() { > # harness are debuggable just from logfiles > config.set("rust", "verbose-tests", e(True)) > > + # Override default linker cc. > + config.set("rust", "default-linker", e(d.expand("${RUST_BUILD_CCLD}"))) > + > # [build] > config.add_section("build") > config.set("build", "submodules", e(False)) > diff --git a/recipes-extended/mozjs/mozjs-78_%.bbappend b/recipes-extended/mozjs/mozjs-78_%.bbappend > new file mode 100644 > index 0000000..8e8c24a > --- /dev/null > +++ b/recipes-extended/mozjs/mozjs-78_%.bbappend > @@ -0,0 +1,14 @@ > +EXTRA_OECONF = " \ > + --target=${RUST_TARGET_SYS} \ > + --host=${BUILD_SYS} \ > + --prefix=${prefix} \ > + --libdir=${libdir} \ > + --x-includes=${STAGING_INCDIR} \ > + --x-libraries=${STAGING_LIBDIR} \ > + --without-system-icu \ > + --disable-tests --disable-strip --disable-optimize \ > + --disable-jemalloc \ > + --with-system-icu \ > + ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', "--enable-gold", '--disable-gold', d)} \ > + ${JIT} \ > +" > diff --git a/recipes-extended/mozjs/mozjs-91_%.bbappend b/recipes-extended/mozjs/mozjs-91_%.bbappend > new file mode 100644 > index 0000000..c0214b0 > --- /dev/null > +++ b/recipes-extended/mozjs/mozjs-91_%.bbappend > @@ -0,0 +1,13 @@ > +do_configure() { > + cd ${B} > + python3 ${S}/configure.py \ > + --enable-project=js \ > + --target=${RUST_HOST_SYS} \ > + --host=${BUILD_SYS} \ > + --prefix=${prefix} \ > + --libdir=${libdir} \ > + --disable-jemalloc \ > + --disable-strip \ > + ${JIT} \ > + ${ICU} > +}
On Tue, 18 Mar 2025, Soumya via lists.yoctoproject.org wrote: > From: Soumya Sambu <soumya.sambu@windriver.com> > > The mozjs-91 and mozjs-78 recipe in meta-openembedded sets --target=${HOST_SYS} and > --target=${TARGET_SYS} respectively, which leads to an error when using Rust from meta-lts-mixins: > > error: Error loading target specification: Could not find specification for target "x86_64-poky-linux". > > Updated target configuration to resolve this. > > Additionally, `mozjs-78` encountered "linker 'cc' not found" error. This was fixed by explicitly > defining the linker for Rust. > > Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com> I'm not planning to take this, since carrying bbappends for recipes outside of oe-core is outside of what I had planned to support with the mixin. If I take it, I will be signing up to test building those recipes on every Rust update for at least the next year, and it would somewhat open the door for people advocating doing the same for scarthgap/rust, which has 3 more years to go. Scott > --- > recipes-devtools/rust/rust_1.81.0.bb | 3 +++ > recipes-extended/mozjs/mozjs-78_%.bbappend | 14 ++++++++++++++ > recipes-extended/mozjs/mozjs-91_%.bbappend | 13 +++++++++++++ > 3 files changed, 30 insertions(+) > create mode 100644 recipes-extended/mozjs/mozjs-78_%.bbappend > create mode 100644 recipes-extended/mozjs/mozjs-91_%.bbappend > > diff --git a/recipes-devtools/rust/rust_1.81.0.bb b/recipes-devtools/rust/rust_1.81.0.bb > index cc00053..2d91d68 100644 > --- a/recipes-devtools/rust/rust_1.81.0.bb > +++ b/recipes-devtools/rust/rust_1.81.0.bb > @@ -146,6 +146,9 @@ python do_configure() { > # harness are debuggable just from logfiles > config.set("rust", "verbose-tests", e(True)) > > + # Override default linker cc. > + config.set("rust", "default-linker", e(d.expand("${RUST_BUILD_CCLD}"))) > + > # [build] > config.add_section("build") > config.set("build", "submodules", e(False)) > diff --git a/recipes-extended/mozjs/mozjs-78_%.bbappend b/recipes-extended/mozjs/mozjs-78_%.bbappend > new file mode 100644 > index 0000000..8e8c24a > --- /dev/null > +++ b/recipes-extended/mozjs/mozjs-78_%.bbappend > @@ -0,0 +1,14 @@ > +EXTRA_OECONF = " \ > + --target=${RUST_TARGET_SYS} \ > + --host=${BUILD_SYS} \ > + --prefix=${prefix} \ > + --libdir=${libdir} \ > + --x-includes=${STAGING_INCDIR} \ > + --x-libraries=${STAGING_LIBDIR} \ > + --without-system-icu \ > + --disable-tests --disable-strip --disable-optimize \ > + --disable-jemalloc \ > + --with-system-icu \ > + ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', "--enable-gold", '--disable-gold', d)} \ > + ${JIT} \ > +" > diff --git a/recipes-extended/mozjs/mozjs-91_%.bbappend b/recipes-extended/mozjs/mozjs-91_%.bbappend > new file mode 100644 > index 0000000..c0214b0 > --- /dev/null > +++ b/recipes-extended/mozjs/mozjs-91_%.bbappend > @@ -0,0 +1,13 @@ > +do_configure() { > + cd ${B} > + python3 ${S}/configure.py \ > + --enable-project=js \ > + --target=${RUST_HOST_SYS} \ > + --host=${BUILD_SYS} \ > + --prefix=${prefix} \ > + --libdir=${libdir} \ > + --disable-jemalloc \ > + --disable-strip \ > + ${JIT} \ > + ${ICU} > +} >
diff --git a/recipes-devtools/rust/rust_1.81.0.bb b/recipes-devtools/rust/rust_1.81.0.bb index cc00053..2d91d68 100644 --- a/recipes-devtools/rust/rust_1.81.0.bb +++ b/recipes-devtools/rust/rust_1.81.0.bb @@ -146,6 +146,9 @@ python do_configure() { # harness are debuggable just from logfiles config.set("rust", "verbose-tests", e(True)) + # Override default linker cc. + config.set("rust", "default-linker", e(d.expand("${RUST_BUILD_CCLD}"))) + # [build] config.add_section("build") config.set("build", "submodules", e(False)) diff --git a/recipes-extended/mozjs/mozjs-78_%.bbappend b/recipes-extended/mozjs/mozjs-78_%.bbappend new file mode 100644 index 0000000..8e8c24a --- /dev/null +++ b/recipes-extended/mozjs/mozjs-78_%.bbappend @@ -0,0 +1,14 @@ +EXTRA_OECONF = " \ + --target=${RUST_TARGET_SYS} \ + --host=${BUILD_SYS} \ + --prefix=${prefix} \ + --libdir=${libdir} \ + --x-includes=${STAGING_INCDIR} \ + --x-libraries=${STAGING_LIBDIR} \ + --without-system-icu \ + --disable-tests --disable-strip --disable-optimize \ + --disable-jemalloc \ + --with-system-icu \ + ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', "--enable-gold", '--disable-gold', d)} \ + ${JIT} \ +" diff --git a/recipes-extended/mozjs/mozjs-91_%.bbappend b/recipes-extended/mozjs/mozjs-91_%.bbappend new file mode 100644 index 0000000..c0214b0 --- /dev/null +++ b/recipes-extended/mozjs/mozjs-91_%.bbappend @@ -0,0 +1,13 @@ +do_configure() { + cd ${B} + python3 ${S}/configure.py \ + --enable-project=js \ + --target=${RUST_HOST_SYS} \ + --host=${BUILD_SYS} \ + --prefix=${prefix} \ + --libdir=${libdir} \ + --disable-jemalloc \ + --disable-strip \ + ${JIT} \ + ${ICU} +}