pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

rust197: complete the transition to the "new fix" for the memchr crate.



Module Name:	pkgsrc-wip
Committed By:	Havard Eidnes <he%NetBSD.org@localhost>
Pushed By:	he
Date:		Sun Jul 26 21:41:47 2026 +0000
Changeset:	56ab32213737d61c774b1bd36363fd1faa5b23e7

Modified Files:
	rust197/Makefile
	rust197/distinfo
	rust197/patches/patch-vendor_memchr-2.7.4_src_vector.rs
Removed Files:
	rust197/patches/patch-vendor_memchr-2.7.4_src_arch_aarch64_memchr.rs
	rust197/patches/patch-vendor_memchr-2.7.4_src_arch_aarch64_mod.rs
	rust197/patches/patch-vendor_memchr-2.7.4_src_memchr.rs
	rust197/patches/patch-vendor_memchr-2.7.4_src_memmem_searcher.rs

Log Message:
rust197: complete the transition to the "new fix" for the memchr crate.

Apply the vector.rs patch consistently also to the 2.7.4 memchr crate,
so that we do not get checksum conflicts for files in newer crates
which are un-changed from 2.7.4 with the older set of patches.

Should complete the fix of https://github.com/rust-lang/rust/issues/159919.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=56ab32213737d61c774b1bd36363fd1faa5b23e7

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 rust197/Makefile                                   |  10 +-
 rust197/distinfo                                   |   6 +-
 ...-vendor_memchr-2.7.4_src_arch_aarch64_memchr.rs |  24 ----
 ...tch-vendor_memchr-2.7.4_src_arch_aarch64_mod.rs |  15 ---
 .../patch-vendor_memchr-2.7.4_src_memchr.rs        | 128 ---------------------
 ...atch-vendor_memchr-2.7.4_src_memmem_searcher.rs |  78 -------------
 .../patch-vendor_memchr-2.7.4_src_vector.rs        |  11 --
 7 files changed, 2 insertions(+), 270 deletions(-)

diffs:
diff --git a/rust197/Makefile b/rust197/Makefile
index 55aa7d74a5..4b9e0cd57d 100644
--- a/rust197/Makefile
+++ b/rust197/Makefile
@@ -547,16 +547,8 @@ CKSUMS+=	eb5033d1f2f3d5314625bc63353b1d105cb414d4bc68edf8700b401e4055d669
 CKSUMS+=	bd504cc95f722a296a5f221c3a3068c9eaa946258beff163581d9492de6ccdce
 
 CKSUM_CRATES+=	vendor/memchr-2.7.4
-CKSUMS+=	5bb70f915084e629d940dbc322f5b9096b2e658cf63fea8a2f6e7550412e73a0
-CKSUMS+=	34aaa34eb7048e8bba49d390942ab707990380952f37f388f3cca30970c53450
-CKSUMS+=	7763472d43c66df596ca0697c07db0b4666d38a6a14f64f9f298aaf756c4a715
-CKSUMS+=	1b26fca824c410077780fbc2f4c53c1d195ba3bdf6785b529ceb0a11f039cec2
 CKSUMS+=	3b15d5cb9715f26e655598eacbb8bbba74cbe8ddb2fb969d13aa75f216a118dd
-CKSUMS+=	8844a2cd5e71abb8efdf8fc3ee54d9c66f3fedb529cdaf5984c279177f5f90af
-CKSUMS+=	6ae779ec5d00f443075316e0105edf30b489a38e2e96325bec14ccecd014145b
-CKSUMS+=	28d66e566b73f6f0f7add4092874dc967ce133bfb6dcbd81f03c9a04b6e4e1d0
-CKSUMS+=	44cd1a614bd66f1e66fc86c541d3c3b8d3a14a644c13e8bf816df3f555eac2d4
-CKSUMS+=	27f9bff08b24828e1a611b10a0282f5457d12e9e7254202040144d392297d720
+CKSUMS+=	cc7227e092904a02235c5518224924eb5e035441a2be2e28ab0102719fbe090f
 
 CKSUM_CRATES+=	vendor/memchr-2.7.6
 CKSUMS+=	e787c4ed2f499802e90910f7aedc7ca41acea39c8ef416b19d6d572c1a540422
diff --git a/rust197/distinfo b/rust197/distinfo
index 6c588c0497..d0f46acc63 100644
--- a/rust197/distinfo
+++ b/rust197/distinfo
@@ -168,11 +168,7 @@ SHA1 (patch-vendor_libc-0.2.186_src_unix_bsd_netbsdlike_netbsd_mod.rs) = df252ac
 SHA1 (patch-vendor_line-index-0.1.2_src_lib.rs) = 30aa5c82630ea0e8969abb527c11640712efba1e
 SHA1 (patch-vendor_lzma-sys-0.1.20_config.h) = 4849052ddb2f04f539fd7060fc1b43cc3acf99c4
 SHA1 (patch-vendor_memchr-2.7.2_src_vector.rs) = 28007f46c3660a7f26a8dbdbbca936dfac2c216c
-SHA1 (patch-vendor_memchr-2.7.4_src_arch_aarch64_memchr.rs) = 3e17e9f068afe5e812d10bf57fd3f6d4c21baf0b
-SHA1 (patch-vendor_memchr-2.7.4_src_arch_aarch64_mod.rs) = 24bbd69c8b571e5652d5306989b6598b58ec1966
-SHA1 (patch-vendor_memchr-2.7.4_src_memchr.rs) = 4c2f4fa4911f38acd3b36c311abd14d3c9751672
-SHA1 (patch-vendor_memchr-2.7.4_src_memmem_searcher.rs) = a5038873015004ab0c8769dda84edc16a9c55f24
-SHA1 (patch-vendor_memchr-2.7.4_src_vector.rs) = ceb9f4bcfa1701276966eba22145f54b1f6142cc
+SHA1 (patch-vendor_memchr-2.7.4_src_vector.rs) = 3c9f7403379e0fef98f65d4554edda44ada28cb8
 SHA1 (patch-vendor_memchr-2.7.5_src_vector.rs) = fb1a33c4150f9897c049cbea29d375b57d0bd684
 SHA1 (patch-vendor_memchr-2.7.6_src_vector.rs) = 5289c3ebf1a34409106d44eda96936f06c1312bb
 SHA1 (patch-vendor_memchr-2.8.0_src_vector.rs) = f7cb9435e46bbb8ad7c1f3ce980279e75e5fa725
diff --git a/rust197/patches/patch-vendor_memchr-2.7.4_src_arch_aarch64_memchr.rs b/rust197/patches/patch-vendor_memchr-2.7.4_src_arch_aarch64_memchr.rs
deleted file mode 100644
index 1ca0cfa6c0..0000000000
--- a/rust197/patches/patch-vendor_memchr-2.7.4_src_arch_aarch64_memchr.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-vendor_memchr-2.7.4_src_arch_aarch64_memchr.rs,v 1.3 2025/08/25 17:51:13 wiz Exp $
-
-Don't try to do neon / SIMD on big-endian aarch64.
-
---- vendor/memchr-2.7.4/src/arch/aarch64/memchr.rs.orig	2024-09-22 14:55:32.455792108 +0000
-+++ vendor/memchr-2.7.4/src/arch/aarch64/memchr.rs
-@@ -8,7 +8,7 @@ available for `aarch64` targets.)
- 
- macro_rules! defraw {
-     ($ty:ident, $find:ident, $start:ident, $end:ident, $($needles:ident),+) => {{
--        #[cfg(target_feature = "neon")]
-+        #[cfg(all(target_feature = "neon", target_endian = "little"))]
-         {
-             use crate::arch::aarch64::neon::memchr::$ty;
- 
-@@ -19,7 +19,7 @@ macro_rules! defraw {
-             // enabled.
-             $ty::new_unchecked($($needles),+).$find($start, $end)
-         }
--        #[cfg(not(target_feature = "neon"))]
-+        #[cfg(not(all(target_feature = "neon", target_endian = "little")))]
-         {
-             use crate::arch::all::memchr::$ty;
- 
diff --git a/rust197/patches/patch-vendor_memchr-2.7.4_src_arch_aarch64_mod.rs b/rust197/patches/patch-vendor_memchr-2.7.4_src_arch_aarch64_mod.rs
deleted file mode 100644
index 405f6b67fb..0000000000
--- a/rust197/patches/patch-vendor_memchr-2.7.4_src_arch_aarch64_mod.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-vendor_memchr-2.7.4_src_arch_aarch64_mod.rs,v 1.3 2025/08/25 17:51:13 wiz Exp $
-
-Don't try to do neon / SIMD on big-endian aarch64.
-
---- vendor/memchr-2.7.4/src/arch/aarch64/mod.rs.orig	2024-09-22 19:17:13.167426584 +0000
-+++ vendor/memchr-2.7.4/src/arch/aarch64/mod.rs
-@@ -2,6 +2,8 @@
- Vector algorithms for the `aarch64` target.
- */
- 
-+#[cfg(target_endian = "little")]
- pub mod neon;
- 
-+#[cfg(target_endian = "little")]
- pub(crate) mod memchr;
diff --git a/rust197/patches/patch-vendor_memchr-2.7.4_src_memchr.rs b/rust197/patches/patch-vendor_memchr-2.7.4_src_memchr.rs
deleted file mode 100644
index 382494dc1d..0000000000
--- a/rust197/patches/patch-vendor_memchr-2.7.4_src_memchr.rs
+++ /dev/null
@@ -1,128 +0,0 @@
-$NetBSD: patch-vendor_memchr-2.7.4_src_memchr.rs,v 1.3 2025/08/25 17:51:13 wiz Exp $
-
-Don't try to do neon / SIMD on big-endian aarch64.
-
---- vendor/memchr-2.7.4/src/memchr.rs.orig	2024-09-22 14:50:24.931022916 +0000
-+++ vendor/memchr-2.7.4/src/memchr.rs
-@@ -518,14 +518,14 @@ unsafe fn memchr_raw(
-     {
-         crate::arch::wasm32::memchr::memchr_raw(needle, start, end)
-     }
--    #[cfg(target_arch = "aarch64")]
-+    #[cfg(all(target_arch = "aarch64", target_endian = "little"))]
-     {
-         crate::arch::aarch64::memchr::memchr_raw(needle, start, end)
-     }
-     #[cfg(not(any(
-         target_arch = "x86_64",
-         all(target_arch = "wasm32", target_feature = "simd128"),
--        target_arch = "aarch64"
-+        all(target_arch = "aarch64", target_endian = "little")
-     )))]
-     {
-         crate::arch::all::memchr::One::new(needle).find_raw(start, end)
-@@ -551,14 +551,14 @@ unsafe fn memrchr_raw(
-     {
-         crate::arch::wasm32::memchr::memrchr_raw(needle, start, end)
-     }
--    #[cfg(target_arch = "aarch64")]
-+    #[cfg(all(target_arch = "aarch64", target_endian = "little"))]
-     {
-         crate::arch::aarch64::memchr::memrchr_raw(needle, start, end)
-     }
-     #[cfg(not(any(
-         target_arch = "x86_64",
-         all(target_arch = "wasm32", target_feature = "simd128"),
--        target_arch = "aarch64"
-+        all(target_arch = "aarch64", target_endian = "little")
-     )))]
-     {
-         crate::arch::all::memchr::One::new(needle).rfind_raw(start, end)
-@@ -585,14 +585,14 @@ unsafe fn memchr2_raw(
-     {
-         crate::arch::wasm32::memchr::memchr2_raw(needle1, needle2, start, end)
-     }
--    #[cfg(target_arch = "aarch64")]
-+    #[cfg(all(target_arch = "aarch64", target_endian = "little"))]
-     {
-         crate::arch::aarch64::memchr::memchr2_raw(needle1, needle2, start, end)
-     }
-     #[cfg(not(any(
-         target_arch = "x86_64",
-         all(target_arch = "wasm32", target_feature = "simd128"),
--        target_arch = "aarch64"
-+        all(target_arch = "aarch64", target_endian = "little")
-     )))]
-     {
-         crate::arch::all::memchr::Two::new(needle1, needle2)
-@@ -620,7 +620,7 @@ unsafe fn memrchr2_raw(
-     {
-         crate::arch::wasm32::memchr::memrchr2_raw(needle1, needle2, start, end)
-     }
--    #[cfg(target_arch = "aarch64")]
-+    #[cfg(all(target_arch = "aarch64", target_endian = "little"))]
-     {
-         crate::arch::aarch64::memchr::memrchr2_raw(
-             needle1, needle2, start, end,
-@@ -629,7 +629,7 @@ unsafe fn memrchr2_raw(
-     #[cfg(not(any(
-         target_arch = "x86_64",
-         all(target_arch = "wasm32", target_feature = "simd128"),
--        target_arch = "aarch64"
-+        all(target_arch = "aarch64", target_endian = "little")
-     )))]
-     {
-         crate::arch::all::memchr::Two::new(needle1, needle2)
-@@ -662,7 +662,7 @@ unsafe fn memchr3_raw(
-             needle1, needle2, needle3, start, end,
-         )
-     }
--    #[cfg(target_arch = "aarch64")]
-+    #[cfg(all(target_arch = "aarch64", target_endian = "little"))]
-     {
-         crate::arch::aarch64::memchr::memchr3_raw(
-             needle1, needle2, needle3, start, end,
-@@ -671,7 +671,7 @@ unsafe fn memchr3_raw(
-     #[cfg(not(any(
-         target_arch = "x86_64",
-         all(target_arch = "wasm32", target_feature = "simd128"),
--        target_arch = "aarch64"
-+        all(target_arch = "aarch64", target_endian = "little")
-     )))]
-     {
-         crate::arch::all::memchr::Three::new(needle1, needle2, needle3)
-@@ -704,7 +704,7 @@ unsafe fn memrchr3_raw(
-             needle1, needle2, needle3, start, end,
-         )
-     }
--    #[cfg(target_arch = "aarch64")]
-+    #[cfg(all(target_arch = "aarch64", target_endian = "little"))]
-     {
-         crate::arch::aarch64::memchr::memrchr3_raw(
-             needle1, needle2, needle3, start, end,
-@@ -713,7 +713,7 @@ unsafe fn memrchr3_raw(
-     #[cfg(not(any(
-         target_arch = "x86_64",
-         all(target_arch = "wasm32", target_feature = "simd128"),
--        target_arch = "aarch64"
-+        all(target_arch = "aarch64", target_endian = "little")
-     )))]
-     {
-         crate::arch::all::memchr::Three::new(needle1, needle2, needle3)
-@@ -736,14 +736,14 @@ unsafe fn count_raw(needle: u8, start: *
-     {
-         crate::arch::wasm32::memchr::count_raw(needle, start, end)
-     }
--    #[cfg(target_arch = "aarch64")]
-+    #[cfg(all(target_arch = "aarch64", target_endian = "little"))]
-     {
-         crate::arch::aarch64::memchr::count_raw(needle, start, end)
-     }
-     #[cfg(not(any(
-         target_arch = "x86_64",
-         all(target_arch = "wasm32", target_feature = "simd128"),
--        target_arch = "aarch64"
-+        all(target_arch = "aarch64", target_endian = "little")
-     )))]
-     {
-         crate::arch::all::memchr::One::new(needle).count_raw(start, end)
diff --git a/rust197/patches/patch-vendor_memchr-2.7.4_src_memmem_searcher.rs b/rust197/patches/patch-vendor_memchr-2.7.4_src_memmem_searcher.rs
deleted file mode 100644
index ac7b8cd586..0000000000
--- a/rust197/patches/patch-vendor_memchr-2.7.4_src_memmem_searcher.rs
+++ /dev/null
@@ -1,78 +0,0 @@
-$NetBSD: patch-vendor_memchr-2.7.4_src_memmem_searcher.rs,v 1.3 2025/08/25 17:51:13 wiz Exp $
-
-Don't try to use neon / SIMD on big-endian aarch64.
-
---- vendor/memchr-2.7.4/src/memmem/searcher.rs.orig	2024-09-22 14:44:21.224731060 +0000
-+++ vendor/memchr-2.7.4/src/memmem/searcher.rs
-@@ -3,7 +3,7 @@ use crate::arch::all::{
-     rabinkarp, twoway,
- };
- 
--#[cfg(target_arch = "aarch64")]
-+#[cfg(all(target_arch = "aarch64", target_endian = "little"))]
- use crate::arch::aarch64::neon::packedpair as neon;
- #[cfg(all(target_arch = "wasm32", target_feature = "simd128"))]
- use crate::arch::wasm32::simd128::packedpair as simd128;
-@@ -129,7 +129,7 @@ impl Searcher {
-                 Searcher::twoway(needle, rabinkarp, prestrat)
-             }
-         }
--        #[cfg(target_arch = "aarch64")]
-+        #[cfg(all(target_arch = "aarch64", target_endian = "little"))]
-         {
-             if let Some(pp) = neon::Finder::with_pair(needle, pair) {
-                 if do_packed_search(needle) {
-@@ -152,7 +152,7 @@ impl Searcher {
-         #[cfg(not(any(
-             all(target_arch = "x86_64", target_feature = "sse2"),
-             all(target_arch = "wasm32", target_feature = "simd128"),
--            target_arch = "aarch64"
-+            all(target_arch = "aarch64", target_endian = "little")
-         )))]
-         {
-             if prefilter.is_none() {
-@@ -253,7 +253,7 @@ union SearcherKind {
-     avx2: crate::arch::x86_64::avx2::packedpair::Finder,
-     #[cfg(all(target_arch = "wasm32", target_feature = "simd128"))]
-     simd128: crate::arch::wasm32::simd128::packedpair::Finder,
--    #[cfg(target_arch = "aarch64")]
-+    #[cfg(all(target_arch = "aarch64", target_endian = "little"))]
-     neon: crate::arch::aarch64::neon::packedpair::Finder,
- }
- 
-@@ -421,7 +421,7 @@ unsafe fn searcher_kind_simd128(
- /// # Safety
- ///
- /// Callers must ensure that the `searcher.kind.neon` union field is set.
--#[cfg(target_arch = "aarch64")]
-+#[cfg(all(target_arch = "aarch64", target_endian = "little"))]
- unsafe fn searcher_kind_neon(
-     searcher: &Searcher,
-     _prestate: &mut PrefilterState,
-@@ -686,7 +686,7 @@ impl Prefilter {
-     }
- 
-     /// Return a prefilter using a aarch64 neon vector algorithm.
--    #[cfg(target_arch = "aarch64")]
-+    #[cfg(all(target_arch = "aarch64", target_endian = "little"))]
-     #[inline]
-     fn neon(finder: neon::Finder, needle: &[u8]) -> Prefilter {
-         trace!("building aarch64 neon prefilter");
-@@ -763,7 +763,7 @@ union PrefilterKind {
-     avx2: crate::arch::x86_64::avx2::packedpair::Finder,
-     #[cfg(all(target_arch = "wasm32", target_feature = "simd128"))]
-     simd128: crate::arch::wasm32::simd128::packedpair::Finder,
--    #[cfg(target_arch = "aarch64")]
-+    #[cfg(all(target_arch = "aarch64", target_endian = "little"))]
-     neon: crate::arch::aarch64::neon::packedpair::Finder,
- }
- 
-@@ -852,7 +852,7 @@ unsafe fn prefilter_kind_simd128(
- /// # Safety
- ///
- /// Callers must ensure that the `strat.kind.neon` union field is set.
--#[cfg(target_arch = "aarch64")]
-+#[cfg(all(target_arch = "aarch64", target_endian = "little"))]
- unsafe fn prefilter_kind_neon(
-     strat: &Prefilter,
-     haystack: &[u8],
diff --git a/rust197/patches/patch-vendor_memchr-2.7.4_src_vector.rs b/rust197/patches/patch-vendor_memchr-2.7.4_src_vector.rs
index af83479327..c4495179a3 100644
--- a/rust197/patches/patch-vendor_memchr-2.7.4_src_vector.rs
+++ b/rust197/patches/patch-vendor_memchr-2.7.4_src_vector.rs
@@ -1,21 +1,10 @@
 $NetBSD: patch-vendor_memchr-2.7.4_src_vector.rs,v 1.3 2025/08/25 17:51:13 wiz Exp $
 
-Don't try to do neon / SIMD on big-endian aarch64.
-
 Apply fix for big-endian aarch64 from
 https://github.com/BurntSushi/memchr/pull/222
 
 --- vendor/memchr-2.7.4/src/vector.rs.orig	2024-09-22 14:16:06.473207292 +0000
 +++ vendor/memchr-2.7.4/src/vector.rs
-@@ -289,7 +289,7 @@ mod x86avx2 {
-     }
- }
- 
--#[cfg(target_arch = "aarch64")]
-+#[cfg(all(target_arch = "aarch64", target_endian = "little"))]
- mod aarch64neon {
-     use core::arch::aarch64::*;
- 
 @@ -319,6 +319,7 @@ mod aarch64neon {
          }
  


Home | Main Index | Thread Index | Old Index