From f917e5fe40a22bc96dde0f86f5ac177c5f8c2ef6 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 25 Oct 2021 10:29:36 -0700 Subject: mozjs: Update to 91.2.0 This has bunch of security fixes https://www.mozilla.org/en-US/security/advisories/mfsa2021-45/ No need to disable jit explicitly for rv32, it works ok without it Signed-off-by: Khem Raj --- .../0001-Cargo.toml-do-not-abort-on-panic.patch | 17 +++--- .../recipes-extended/mozjs/mozjs_91.1.0.bb | 71 ---------------------- .../recipes-extended/mozjs/mozjs_91.2.0.bb | 70 +++++++++++++++++++++ 3 files changed, 77 insertions(+), 81 deletions(-) delete mode 100644 meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_91.1.0.bb create mode 100644 meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_91.2.0.bb diff --git a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0001-Cargo.toml-do-not-abort-on-panic.patch b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0001-Cargo.toml-do-not-abort-on-panic.patch index 34861de7f2..e09848f403 100644 --- a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0001-Cargo.toml-do-not-abort-on-panic.patch +++ b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0001-Cargo.toml-do-not-abort-on-panic.patch @@ -11,11 +11,15 @@ Signed-off-by: Alexander Kanavin Cargo.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -diff --git a/Cargo.toml b/Cargo.toml -index 09f3e7292f..0fff412569 100644 --- a/Cargo.toml +++ b/Cargo.toml -@@ -57,7 +57,6 @@ panic = "abort" +@@ -51,13 +51,11 @@ opt-level = 1 + rpath = false + lto = false + debug-assertions = true +-panic = "abort" + + [profile.release] opt-level = 2 rpath = false debug-assertions = false @@ -23,10 +27,3 @@ index 09f3e7292f..0fff412569 100644 # Optimize build dependencies, because bindgen and proc macros / style # compilation take more to run than to build otherwise. -@@ -105,4 +104,4 @@ path = "third_party/rust/mio" - - # Patch failure 0.1.8 to disable the backtrace feature by default. See bug 1608157. - [patch.crates-io.failure] --path = "third_party/rust/failure" -\ No newline at end of file -+path = "third_party/rust/failure" diff --git a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_91.1.0.bb b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_91.1.0.bb deleted file mode 100644 index ff0d7bd6ab..0000000000 --- a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_91.1.0.bb +++ /dev/null @@ -1,71 +0,0 @@ -SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++" -HOMEPAGE = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey" -LICENSE = "MPL-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=dc9b6ecd19a14a54a628edaaf23733bf" - -SRC_URI = "https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/firefox-${PV}esr.source.tar.xz \ - file://0001-Cargo.toml-do-not-abort-on-panic.patch \ - file://0002-moz.configure-do-not-look-for-llvm-objdump.patch \ - file://0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch \ - file://0004-use-asm-sgidefs.h.patch \ - file://fix-musl-build.patch \ - file://0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch \ - file://riscv32.patch \ - " -SRC_URI[sha256sum] = "3b913d6a52c95a8986123c98543f1273812a2d59f2891b4b1c604e35f4580766" - -S = "${WORKDIR}/firefox-${@d.getVar("PV").replace("esr", "")}" - -inherit pkgconfig perlnative python3native rust - -DEPENDS += "zlib cargo-native python3" - -B = "${WORKDIR}/build" - -export PYTHONPATH = "${S}/build:${S}/third_party/python/PyYAML/lib3:${S}/testing/mozbase/mozfile:${S}/python/mozboot:${S}/third_party/python/distro:${S}/testing/mozbase/mozinfo:${S}/config:${S}/testing/mozbase/manifestparser:${S}/third_party/python/pytoml:${S}/testing/mozbase/mozprocess:${S}/third_party/python/six:${S}/python/mozbuild:${S}/python/mozbuild/mozbuild:${S}/python/mach:${S}/third_party/python/jsmin:${S}/python/mozversioncontrol" - -export HOST_CC = "${BUILD_CC}" -export HOST_CXX = "${BUILD_CXX}" -export HOST_CFLAGS = "${BUILD_CFLAGS}" -export HOST_CPPFLAGS = "${BUILD_CPPFLAGS}" -export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}" - -export AS = "${CC}" - -export RUSTFLAGS - -JIT ?= "" - -JIT:mipsarch = "--disable-jit" -JIT:riscv32 = "--disable-jit" - -do_configure() { - cd ${B} - python3 ${S}/configure.py \ - --enable-project=js \ - --target=${HOST_SYS} \ - --host=${BUILD_SYS} \ - --prefix=${prefix} \ - --libdir=${libdir} \ - --disable-jemalloc \ - ${JIT} - -} - -do_install() { - oe_runmake 'DESTDIR=${D}' install -} - -inherit multilib_script multilib_header - -MULTILIB_SCRIPTS += " ${PN}-dev:${bindir}/js91-config" - -do_install:append() { - oe_multilib_header mozjs-91/js-config.h - sed -e 's@${STAGING_DIR_HOST}@@g' \ - -i ${D}${bindir}/js91-config -} - -PACKAGES =+ "lib${BPN}-staticdev lib${BPN}" -FILES:lib${BPN}-staticdev += "${libdir}/libjs_static.ajs" -FILES:lib${BPN} += "${libdir}/lib*" diff --git a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_91.2.0.bb b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_91.2.0.bb new file mode 100644 index 0000000000..45f0145313 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_91.2.0.bb @@ -0,0 +1,70 @@ +SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++" +HOMEPAGE = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey" +LICENSE = "MPL-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=dc9b6ecd19a14a54a628edaaf23733bf" + +SRC_URI = "https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/firefox-${PV}esr.source.tar.xz \ + file://0001-Cargo.toml-do-not-abort-on-panic.patch \ + file://0002-moz.configure-do-not-look-for-llvm-objdump.patch \ + file://0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch \ + file://0004-use-asm-sgidefs.h.patch \ + file://fix-musl-build.patch \ + file://0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch \ + file://riscv32.patch \ + " +SRC_URI[sha256sum] = "3ef3cfd321d0c2c80ee1b41b8baf7a1ea4daf93c29e1377274933440ff5e42c3" + +S = "${WORKDIR}/firefox-${@d.getVar("PV").replace("esr", "")}" + +inherit pkgconfig perlnative python3native rust + +DEPENDS += "zlib cargo-native python3" + +B = "${WORKDIR}/build" + +export PYTHONPATH = "${S}/build:${S}/third_party/python/PyYAML/lib3:${S}/testing/mozbase/mozfile:${S}/python/mozboot:${S}/third_party/python/distro:${S}/testing/mozbase/mozinfo:${S}/config:${S}/testing/mozbase/manifestparser:${S}/third_party/python/pytoml:${S}/testing/mozbase/mozprocess:${S}/third_party/python/six:${S}/python/mozbuild:${S}/python/mozbuild/mozbuild:${S}/python/mach:${S}/third_party/python/jsmin:${S}/python/mozversioncontrol" + +export HOST_CC = "${BUILD_CC}" +export HOST_CXX = "${BUILD_CXX}" +export HOST_CFLAGS = "${BUILD_CFLAGS}" +export HOST_CPPFLAGS = "${BUILD_CPPFLAGS}" +export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}" + +export AS = "${CC}" + +export RUSTFLAGS + +JIT ?= "" + +JIT:mipsarch = "--disable-jit" + +do_configure() { + cd ${B} + python3 ${S}/configure.py \ + --enable-project=js \ + --target=${HOST_SYS} \ + --host=${BUILD_SYS} \ + --prefix=${prefix} \ + --libdir=${libdir} \ + --disable-jemalloc \ + ${JIT} + +} + +do_install() { + oe_runmake 'DESTDIR=${D}' install +} + +inherit multilib_script multilib_header + +MULTILIB_SCRIPTS += " ${PN}-dev:${bindir}/js91-config" + +do_install:append() { + oe_multilib_header mozjs-91/js-config.h + sed -e 's@${STAGING_DIR_HOST}@@g' \ + -i ${D}${bindir}/js91-config +} + +PACKAGES =+ "lib${BPN}-staticdev lib${BPN}" +FILES:lib${BPN}-staticdev += "${libdir}/libjs_static.ajs" +FILES:lib${BPN} += "${libdir}/lib*" -- cgit 1.2.3-korg