diff --git a/firefox.spec b/firefox.spec index c600f73846c0fae9fce85ec3da4925385ce7220c..cfa7404f8a68bd865c951ec4c79f1dcd47fbabb0 100644 --- a/firefox.spec +++ b/firefox.spec @@ -45,7 +45,7 @@ Summary: Mozilla Firefox Web browser Name: firefox Version: 115.9.0 -Release: 1 +Release: 2 URL: https://www.mozilla.org/firefox/ License: MPL-1.1 or GPL-2.0-or-later or LGPL-2.0-or-later Source0: https://ftp.mozilla.org/pub/firefox/releases/%{version}esr/source/firefox-%{version}esr.source.tar.xz @@ -79,6 +79,7 @@ Source37: mochitest-python.tar.gz # Build patches Patch01: disable-glean-sdk,psutil,zstandard.patch Patch02: firefox-gcc-build.patch +Patch03: fix-rust-1.78-unknown-feature-stdsimd-error.patch # -- Upstreamed patches -- @@ -396,6 +397,7 @@ rm -vf ./*/layout/inspector/tests/chrome/test_fontVariationsAPI.css # Build patches %patch -P1 -p1 %patch -P2 -p1 -b .firefox-gcc-build +%patch -P3 -p1 # -- Upstreamed patches -- %patch -P51 -p1 -b .mozilla-bmo1170092 @@ -955,6 +957,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %endif %changelog +* Fri May 10 2024 wangkai <13474090681@163.com> - 115.9.0-2 +- fix rust-1.78 unknown feature stdsimd error + * Wed Mar 20 2024 wangkai <13474090681@163.com> - 115.9.0-1 - Update to 115.9.0 - Fix CVE-2024-2616 CVE-2024-2608 CVE-2024-2610 CVE-2024-2612 CVE-2024-2614 CVE-2023-5388 CVE-2024-2607 CVE-2024-2611 diff --git a/fix-rust-1.78-unknown-feature-stdsimd-error.patch b/fix-rust-1.78-unknown-feature-stdsimd-error.patch new file mode 100644 index 0000000000000000000000000000000000000000..9d31d3d0aefdd1e72f9b41d905399f63834db3d7 --- /dev/null +++ b/fix-rust-1.78-unknown-feature-stdsimd-error.patch @@ -0,0 +1,92 @@ +Origin: https://hg.mozilla.org/integration/autoland/rev/e9b01ce8e2fe + +# HG changeset patch +# User Jeff Muizelaar +# Date 1709608348 0 +# Node ID e9b01ce8e2fe053ffef77505f05cf18ed0b9fcd2 +# Parent 171664703051d94e1be995b74ad97a9dff5beea5 +Bug 1882291. Switch to stdarch_arm_neon_intrinsics feature on rust >=1.78. r=glandium + +We only need this on ARM32 because the ARM64 intrinsics are stable. + +stdarch_arm_neon_intrinsics was split out from stdsimd here: +https://github.com/rust-lang/stdarch/pull/1486 + +Differential Revision: https://phabricator.services.mozilla.com/D203039 + +diff --git a/Cargo.lock b/Cargo.lock +--- a/Cargo.lock ++++ b/Cargo.lock +@@ -4579,16 +4579,17 @@ dependencies = [ + "libc", + ] + + [[package]] + name = "qcms" + version = "0.2.0" + dependencies = [ + "libc", ++ "version_check", + ] + + [[package]] + name = "qlog" + version = "0.4.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "8777d5490145d6907198d48b3a907447689ce80e071b3d8a16a9d9fb3df02bc1" + dependencies = [ +diff --git a/gfx/qcms/Cargo.toml b/gfx/qcms/Cargo.toml +--- a/gfx/qcms/Cargo.toml ++++ b/gfx/qcms/Cargo.toml +@@ -15,8 +15,11 @@ categories = ["graphics"] + default = ["iccv4-enabled", "cmyk"] + c_bindings = ["libc"] + neon = [] + iccv4-enabled = [] + cmyk = [] + + [dependencies] + libc = {version = "0.2", optional = true } ++ ++[build-dependencies] ++version_check = "0.9" +diff --git a/gfx/qcms/build.rs b/gfx/qcms/build.rs +new file mode 100644 +--- /dev/null ++++ b/gfx/qcms/build.rs +@@ -0,0 +1,7 @@ ++extern crate version_check as rustc; ++ ++fn main() { ++ if rustc::is_min_version("1.78.0").unwrap_or(false) { ++ println!("cargo:rustc-cfg=stdsimd_split"); ++ } ++} +diff --git a/gfx/qcms/src/lib.rs b/gfx/qcms/src/lib.rs +--- a/gfx/qcms/src/lib.rs ++++ b/gfx/qcms/src/lib.rs +@@ -2,19 +2,21 @@ + */ + + #![allow(dead_code)] + #![allow(non_camel_case_types)] + #![allow(non_snake_case)] + #![allow(non_upper_case_globals)] + // These are needed for the neon SIMD code and can be removed once the MSRV supports the + // instrinsics we use +-#![cfg_attr(feature = "neon", feature(stdsimd))] ++#![cfg_attr(all(stdsimd_split, target_arch = "arm", feature = "neon"), feature(stdarch_arm_neon_intrinsics))] ++#![cfg_attr(all(stdsimd_split, target_arch = "arm", feature = "neon"), feature(stdarch_arm_feature_detection))] ++#![cfg_attr(all(not(stdsimd_split), target_arch = "arm", feature = "neon"), feature(stdsimd))] + #![cfg_attr( +- feature = "neon", ++ all(target_arch = "arm", feature = "neon"), + feature(arm_target_feature, raw_ref_op) + + )] + + /// These values match the Rendering Intent values from the ICC spec + #[repr(C)] + #[derive(Clone, Copy, Debug)] + pub enum Intent { +