diff options
author | Nathan Pratta Teodosio <nathan.teodosio@canonical.com> | 2025-01-16 16:53:46 +0100 |
---|---|---|
committer | Nathan Pratta Teodosio <nathan.teodosio@canonical.com> | 2025-01-16 22:18:15 +0100 |
commit | bc1e213748b526933d3f5d699b3880ae0b36df44 (patch) | |
tree | 5234b936618e643fda27437f2a8a9ed2a76e1c6f | |
parent | 96d14808dd3fdc9c8ada75427d3543363308c0b9 (diff) |
Bring in patches from dev channel.
-rw-r--r-- | patches/linker-oom-armhf.patch | 2 | ||||
-rw-r--r-- | patches/node-update-binaries-arch-specific.patch | 2 | ||||
-rw-r--r-- | patches/revert-rust-image-png.patch | 92 | ||||
-rw-r--r-- | patches/series | 1 |
4 files changed, 95 insertions, 2 deletions
diff --git a/patches/linker-oom-armhf.patch b/patches/linker-oom-armhf.patch index 30357db..27e6177 100644 --- a/patches/linker-oom-armhf.patch +++ b/patches/linker-oom-armhf.patch @@ -11,7 +11,7 @@ Forwarded: not-needed @@ -540,6 +542,10 @@ config("compiler") { # error. "-lpthread" is added in //build/config:default_libs. } - + + if (is_linux && target_cpu == "arm") { + ldflags += [ "-Wl,--no-keep-memory" ] + } diff --git a/patches/node-update-binaries-arch-specific.patch b/patches/node-update-binaries-arch-specific.patch index 22be877..d56396f 100644 --- a/patches/node-update-binaries-arch-specific.patch +++ b/patches/node-update-binaries-arch-specific.patch @@ -15,7 +15,7 @@ Description: Make the script that fetches the Node.js release tarball architectu missing and no known rule to make it . Author: Nathan Pratta Teodosio <nathan.teodosio@canonical.com> -Forwarded: https://chromium-review.googlesource.com/c/chromium/src/+/5638657 +Forwarded: not-needed --- a/third_party/node/update_node_binaries +++ b/third_party/node/update_node_binaries diff --git a/patches/revert-rust-image-png.patch b/patches/revert-rust-image-png.patch new file mode 100644 index 0000000..17fde03 --- /dev/null +++ b/patches/revert-rust-image-png.patch @@ -0,0 +1,92 @@ +--- b/third_party/rust/chromium_crates_io/vendor/png-0.17.15/src/filter.rs ++++ a/third_party/rust/chromium_crates_io/vendor/png-0.17.15/src/filter.rs +@@ -7,13 +7,11 @@ + /// TODO(https://github.com/rust-lang/rust/issues/86656): Stop gating this module behind the + /// "unstable" feature of the `png` crate. This should be possible once the "portable_simd" + /// feature of Rust gets stabilized. ++#[cfg(feature = "unstable")] +-/// +-/// This is only known to help on x86, with no change measured on most benchmarks on ARM, +-/// and even severely regressing some of them. +-/// So despite the code being portable, we only enable this for x86. +-/// We can add more platforms once this code is proven to be beneficial for them. +-#[cfg(all(feature = "unstable", target_arch = "x86_64"))] + mod simd { ++ // unused imports may ocur in this module due to conditional compilation ++ #![allow(unused_imports)] ++ use std::simd::cmp::{SimdOrd, SimdPartialEq, SimdPartialOrd}; + use std::simd::num::{SimdInt, SimdUint}; + use std::simd::{u8x4, u8x8, LaneCount, Simd, SimdElement, SupportedLaneCount}; + +@@ -28,6 +26,7 @@ + /// Funnily, the autovectorizer does a better job here + /// than a handwritten algorithm using std::simd! + /// We used to have a handwritten one but this is just faster. ++ #[cfg(target_arch = "x86_64")] + fn paeth_predictor<const N: usize>( + a: Simd<i16, N>, + b: Simd<i16, N>, +@@ -79,6 +78,7 @@ + /// + /// `b` is the current pixel in the previous row. `x` is the current pixel in the current row. + /// See also https://www.w3.org/TR/png/#filter-byte-positions ++ #[cfg(target_arch = "x86_64")] + fn paeth_step<const N: usize>( + state: &mut PaethState<i16, N>, + b: Simd<u8, N>, +@@ -116,15 +116,18 @@ + state.a = *x; + } + ++ #[cfg(target_arch = "x86_64")] + fn load3(src: &[u8]) -> u8x4 { + u8x4::from_array([src[0], src[1], src[2], 0]) + } + ++ #[cfg(target_arch = "x86_64")] + fn store3(src: u8x4, dest: &mut [u8]) { + dest[0..3].copy_from_slice(&src.to_array()[0..3]) + } + + /// Undoes `FilterType::Paeth` for `BytesPerPixel::Three`. ++ #[cfg(target_arch = "x86_64")] + pub fn unfilter_paeth3(mut prev_row: &[u8], mut curr_row: &mut [u8]) { + debug_assert_eq!(prev_row.len(), curr_row.len()); + debug_assert_eq!(prev_row.len() % 3, 0); +@@ -179,15 +182,18 @@ + } + } + ++ #[cfg(target_arch = "x86_64")] + fn load6(src: &[u8]) -> u8x8 { + u8x8::from_array([src[0], src[1], src[2], src[3], src[4], src[5], 0, 0]) + } + ++ #[cfg(target_arch = "x86_64")] + fn store6(src: u8x8, dest: &mut [u8]) { + dest[0..6].copy_from_slice(&src.to_array()[0..6]) + } + + /// Undoes `FilterType::Paeth` for `BytesPerPixel::Six`. ++ #[cfg(target_arch = "x86_64")] + pub fn unfilter_paeth6(mut prev_row: &[u8], mut curr_row: &mut [u8]) { + debug_assert_eq!(prev_row.len(), curr_row.len()); + debug_assert_eq!(prev_row.len() % 6, 0); +@@ -769,7 +775,7 @@ + } + } + BytesPerPixel::Four => { ++ #[cfg(feature = "unstable")] +- #[cfg(all(feature = "unstable", target_arch = "x86_64"))] + { + simd::unfilter_paeth_u8::<4>(previous, current); + return; +@@ -837,7 +844,7 @@ + } + } + BytesPerPixel::Eight => { ++ #[cfg(feature = "unstable")] +- #[cfg(all(feature = "unstable", target_arch = "x86_64"))] + { + simd::unfilter_paeth_u8::<8>(previous, current); + return; diff --git a/patches/series b/patches/series index fc0e4e4..c605071 100644 --- a/patches/series +++ b/patches/series @@ -27,3 +27,4 @@ no-widevine.patch no-unknown-warning.patch rust-mess.patch default-visibility-arg.patch +revert-rust-image-png.patch |