diff --git a/sysutils/dua-cli/distinfo b/sysutils/dua-cli/distinfo index 0a4896faff98..a49c567b162a 100644 --- a/sysutils/dua-cli/distinfo +++ b/sysutils/dua-cli/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.37 2024/08/10 15:24:44 pin Exp $ +$NetBSD: distinfo,v 1.38 2024/10/02 17:49:02 he Exp $ BLAKE2s (addr2line-0.22.0.crate) = 834589b7006b3b8d1e40e66abf813d18a5e9d6fac9433c24b0b18920c435a58e SHA512 (addr2line-0.22.0.crate) = b334f51bd369348b4446805b4f624ec9b4cc8eefcc53ceb57b523ff55bf018d1dfe23259daf48d1878170ad4fcb44181d4738456eb5e35ede6932ff29686268e @@ -525,3 +525,8 @@ Size (zerocopy-0.7.35.crate) = 152645 bytes BLAKE2s (zerocopy-derive-0.7.35.crate) = b80899d1b7a843a5225638171775a0c9643052c9e96f7b88a825150d0725505e SHA512 (zerocopy-derive-0.7.35.crate) = dbe23573b62a6267d7bc8c744320b75b2fbda03b908c1d175211f7394374fe182bce58021e25485c10671d726b2007f250565dfe53134d51c89293bb607e9feb Size (zerocopy-derive-0.7.35.crate) = 37829 bytes +SHA1 (patch-.._vendor_memchr-2.7.4_src_arch_aarch64_mod.rs) = ca83fcd3a2c7aff1828d18a5ca4df1e3ae3557fb +SHA1 (patch-.._vendor_memchr-2.7.4_src_memchr.rs) = b964579dd7ea479e2f4be41843b5b8161dbc2eae +SHA1 (patch-.._vendor_memchr-2.7.4_src_memmem_searcher.rs) = 2317e98578bf30ead561a1af1974db454e88a11c +SHA1 (patch-.._vendor_memchr-2.7.4_src_vector.rs) = 8acec8d16fad3cf64fc66c97cc7717549069ee0e +SHA1 (patch-.._vendor_zerocopy-0.7.35_src_lib.rs) = 908bf1ca2244c4ca1af6d7c75cbad250fac5ea9c diff --git a/sysutils/dua-cli/patches/patch-.._vendor_memchr-2.7.4_src_arch_aarch64_mod.rs b/sysutils/dua-cli/patches/patch-.._vendor_memchr-2.7.4_src_arch_aarch64_mod.rs new file mode 100644 index 000000000000..44f1cff79d41 --- /dev/null +++ b/sysutils/dua-cli/patches/patch-.._vendor_memchr-2.7.4_src_arch_aarch64_mod.rs @@ -0,0 +1,15 @@ +$NetBSD: patch-.._vendor_memchr-2.7.4_src_arch_aarch64_mod.rs,v 1.1 2024/10/02 17:49:02 he Exp $ + +Make this build on big-endian aarch64. + +--- ../vendor/memchr-2.7.4/src/arch/aarch64/mod.rs.orig 2024-10-01 22:42:20.721140485 +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/sysutils/dua-cli/patches/patch-.._vendor_memchr-2.7.4_src_memchr.rs b/sysutils/dua-cli/patches/patch-.._vendor_memchr-2.7.4_src_memchr.rs new file mode 100644 index 000000000000..58098692dd97 --- /dev/null +++ b/sysutils/dua-cli/patches/patch-.._vendor_memchr-2.7.4_src_memchr.rs @@ -0,0 +1,128 @@ +$NetBSD: patch-.._vendor_memchr-2.7.4_src_memchr.rs,v 1.1 2024/10/02 17:49:02 he Exp $ + +Make this build on big-endian aarch64. + +--- ../vendor/memchr-2.7.4/src/memchr.rs.orig 2024-10-01 22:37:24.143489357 +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/sysutils/dua-cli/patches/patch-.._vendor_memchr-2.7.4_src_memmem_searcher.rs b/sysutils/dua-cli/patches/patch-.._vendor_memchr-2.7.4_src_memmem_searcher.rs new file mode 100644 index 000000000000..f0823281ff76 --- /dev/null +++ b/sysutils/dua-cli/patches/patch-.._vendor_memchr-2.7.4_src_memmem_searcher.rs @@ -0,0 +1,78 @@ +$NetBSD: patch-.._vendor_memchr-2.7.4_src_memmem_searcher.rs,v 1.1 2024/10/02 17:49:02 he Exp $ + +Make this build on big-endian aarch64. + +--- ../vendor/memchr-2.7.4/src/memmem/searcher.rs.orig 2024-10-01 22:46:23.364125524 +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/sysutils/dua-cli/patches/patch-.._vendor_memchr-2.7.4_src_vector.rs b/sysutils/dua-cli/patches/patch-.._vendor_memchr-2.7.4_src_vector.rs new file mode 100644 index 000000000000..391940c81a5b --- /dev/null +++ b/sysutils/dua-cli/patches/patch-.._vendor_memchr-2.7.4_src_vector.rs @@ -0,0 +1,15 @@ +$NetBSD: patch-.._vendor_memchr-2.7.4_src_vector.rs,v 1.1 2024/10/02 17:49:02 he Exp $ + +Make this build on big-endian aarch64. + +--- ../vendor/memchr-2.7.4/src/vector.rs.orig 2024-10-01 22:43:45.510956667 +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::*; + diff --git a/sysutils/dua-cli/patches/patch-.._vendor_zerocopy-0.7.35_src_lib.rs b/sysutils/dua-cli/patches/patch-.._vendor_zerocopy-0.7.35_src_lib.rs new file mode 100644 index 000000000000..d0dc198b0027 --- /dev/null +++ b/sysutils/dua-cli/patches/patch-.._vendor_zerocopy-0.7.35_src_lib.rs @@ -0,0 +1,24 @@ +$NetBSD: patch-.._vendor_zerocopy-0.7.35_src_lib.rs,v 1.1 2024/10/02 17:49:02 he Exp $ + +Make this build on big-endian aarch64. + +--- ../vendor/zerocopy-0.7.35/src/lib.rs.orig 2024-10-01 22:31:58.027833427 +0000 ++++ ../vendor/zerocopy-0.7.35/src/lib.rs +@@ -3736,7 +3736,7 @@ mod simd { + powerpc64, powerpc64, vector_bool_long, vector_double, vector_signed_long, vector_unsigned_long + ); + simd_arch_mod!( +- #[cfg(target_arch = "aarch64")] ++ #[cfg(all(target_arch = "aarch64", target_endian = "little"))] + aarch64, aarch64, float32x2_t, float32x4_t, float64x1_t, float64x2_t, int8x8_t, int8x8x2_t, + int8x8x3_t, int8x8x4_t, int8x16_t, int8x16x2_t, int8x16x3_t, int8x16x4_t, int16x4_t, + int16x8_t, int32x2_t, int32x4_t, int64x1_t, int64x2_t, poly8x8_t, poly8x8x2_t, poly8x8x3_t, +@@ -8026,7 +8026,7 @@ mod tests { + vector_signed_long, + vector_unsigned_long + ); +- #[cfg(target_arch = "aarch64")] ++ #[cfg(all(target_arch = "aarch64", target_endian = "little"))] + #[rustfmt::skip] + test_simd_arch_mod!( + aarch64, float32x2_t, float32x4_t, float64x1_t, float64x2_t, int8x8_t, int8x8x2_t,