pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/sysutils/dua-cli
Module Name: pkgsrc
Committed By: he
Date: Wed Oct 2 17:49:02 UTC 2024
Modified Files:
pkgsrc/sysutils/dua-cli: distinfo
Added Files:
pkgsrc/sysutils/dua-cli/patches:
patch-.._vendor_memchr-2.7.4_src_arch_aarch64_mod.rs
patch-.._vendor_memchr-2.7.4_src_memchr.rs
patch-.._vendor_memchr-2.7.4_src_memmem_searcher.rs
patch-.._vendor_memchr-2.7.4_src_vector.rs
patch-.._vendor_zerocopy-0.7.35_src_lib.rs
Log Message:
sysutils/dua-cli: make this build on aarch64eb.
This is done by avoiding attempts at using neon / SIMD in
big-endian mode by patching some of the vendored crates.
Neon / SIMD is known to be problematical in rust, ref.
https://github.com/rust-lang/stdarch/issues/1484, even
though the CPU itself supports it.
I've also tried reporting the memchr fixes upstream, ref.
https://github.com/BurntSushi/memchr/pull/162
So far not yet adopted.
Zerocopy has also received a pull request:
https://github.com/google/zerocopy/pull/1795
To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 pkgsrc/sysutils/dua-cli/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/sysutils/dua-cli/patches/patch-.._vendor_memchr-2.7.4_src_arch_aarch64_mod.rs \
pkgsrc/sysutils/dua-cli/patches/patch-.._vendor_memchr-2.7.4_src_memchr.rs \
pkgsrc/sysutils/dua-cli/patches/patch-.._vendor_memchr-2.7.4_src_memmem_searcher.rs \
pkgsrc/sysutils/dua-cli/patches/patch-.._vendor_memchr-2.7.4_src_vector.rs \
pkgsrc/sysutils/dua-cli/patches/patch-.._vendor_zerocopy-0.7.35_src_lib.rs
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/sysutils/dua-cli/distinfo
diff -u pkgsrc/sysutils/dua-cli/distinfo:1.37 pkgsrc/sysutils/dua-cli/distinfo:1.38
--- pkgsrc/sysutils/dua-cli/distinfo:1.37 Sat Aug 10 15:24:44 2024
+++ pkgsrc/sysutils/dua-cli/distinfo Wed Oct 2 17:49:02 2024
@@ -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 by
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
Added files:
Index: pkgsrc/sysutils/dua-cli/patches/patch-.._vendor_memchr-2.7.4_src_arch_aarch64_mod.rs
diff -u /dev/null pkgsrc/sysutils/dua-cli/patches/patch-.._vendor_memchr-2.7.4_src_arch_aarch64_mod.rs:1.1
--- /dev/null Wed Oct 2 17:49:02 2024
+++ pkgsrc/sysutils/dua-cli/patches/patch-.._vendor_memchr-2.7.4_src_arch_aarch64_mod.rs Wed Oct 2 17:49:02 2024
@@ -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;
Index: pkgsrc/sysutils/dua-cli/patches/patch-.._vendor_memchr-2.7.4_src_memchr.rs
diff -u /dev/null pkgsrc/sysutils/dua-cli/patches/patch-.._vendor_memchr-2.7.4_src_memchr.rs:1.1
--- /dev/null Wed Oct 2 17:49:02 2024
+++ pkgsrc/sysutils/dua-cli/patches/patch-.._vendor_memchr-2.7.4_src_memchr.rs Wed Oct 2 17:49:02 2024
@@ -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)
Index: pkgsrc/sysutils/dua-cli/patches/patch-.._vendor_memchr-2.7.4_src_memmem_searcher.rs
diff -u /dev/null pkgsrc/sysutils/dua-cli/patches/patch-.._vendor_memchr-2.7.4_src_memmem_searcher.rs:1.1
--- /dev/null Wed Oct 2 17:49:02 2024
+++ pkgsrc/sysutils/dua-cli/patches/patch-.._vendor_memchr-2.7.4_src_memmem_searcher.rs Wed Oct 2 17:49:02 2024
@@ -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],
Index: pkgsrc/sysutils/dua-cli/patches/patch-.._vendor_memchr-2.7.4_src_vector.rs
diff -u /dev/null pkgsrc/sysutils/dua-cli/patches/patch-.._vendor_memchr-2.7.4_src_vector.rs:1.1
--- /dev/null Wed Oct 2 17:49:02 2024
+++ pkgsrc/sysutils/dua-cli/patches/patch-.._vendor_memchr-2.7.4_src_vector.rs Wed Oct 2 17:49:02 2024
@@ -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::*;
+
Index: pkgsrc/sysutils/dua-cli/patches/patch-.._vendor_zerocopy-0.7.35_src_lib.rs
diff -u /dev/null pkgsrc/sysutils/dua-cli/patches/patch-.._vendor_zerocopy-0.7.35_src_lib.rs:1.1
--- /dev/null Wed Oct 2 17:49:02 2024
+++ pkgsrc/sysutils/dua-cli/patches/patch-.._vendor_zerocopy-0.7.35_src_lib.rs Wed Oct 2 17:49:02 2024
@@ -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,
Home |
Main Index |
Thread Index |
Old Index