git: db2cab46a53e - main - textproc/ripgrep: Unbreak with CPUTYPE=haswell and rust>=1.48.0

Tobias Kortkamp tobik at FreeBSD.org
Mon Jun 14 20:51:19 UTC 2021


The branch main has been updated by tobik:

URL: https://cgit.FreeBSD.org/ports/commit/?id=db2cab46a53e97833b2368cd4ee04e792a5c72f4

commit db2cab46a53e97833b2368cd4ee04e792a5c72f4
Author:     Tobias Kortkamp <tobik at FreeBSD.org>
AuthorDate: 2021-06-13 12:38:06 +0000
Commit:     Tobias Kortkamp <tobik at FreeBSD.org>
CommitDate: 2021-06-14 20:51:05 +0000

    textproc/ripgrep: Unbreak with CPUTYPE=haswell and rust>=1.48.0
    
    error[E0432]: unresolved import `crate::arch::x86_64::_mm_shuffle_pi8`
       --> /usr/ports/textproc/ripgrep/work/ripgrep-12.1.1/cargo-crates/packed_simd-0.3.3/src/codegen/shuffle1_dyn.rs:40:29
        |
    40  |                         use crate::arch::x86_64::_mm_shuffle_pi8;
        |                             ^^^^^^^^^^^^^^^^^^^^^---------------
        |                             |                    |
        |                             |                    help: a similar name exists in the module: `_mm_shuffle_epi8`
        |                             no `_mm_shuffle_pi8` in `arch::x86_64`
    ...
    297 | impl_shuffle1_dyn!(u8x8);
        | ------------------------- in this macro invocation
        |
    
    Pull in newer packed_simd crate to fix it.  Newer versions are
    published as packed_simd_2 because the original author is MIA.
    
    PR:             251425
    Reported by:    Tomoaki AOKI <junchoon at dec.sakura.ne.jp>
---
 textproc/ripgrep/Makefile                |   7 +-
 textproc/ripgrep/distinfo                |   8 ++-
 textproc/ripgrep/files/patch-packed_simd | 114 -------------------------------
 3 files changed, 10 insertions(+), 119 deletions(-)

diff --git a/textproc/ripgrep/Makefile b/textproc/ripgrep/Makefile
index 0e7110d701d2..107d13aaa1e5 100644
--- a/textproc/ripgrep/Makefile
+++ b/textproc/ripgrep/Makefile
@@ -2,7 +2,7 @@
 
 PORTNAME=	ripgrep
 DISTVERSION=	12.1.1
-PORTREVISION=	11
+PORTREVISION=	12
 CATEGORIES=	textproc
 
 MAINTAINER=	petteri.valkonen at iki.fi
@@ -43,12 +43,13 @@ CARGO_CRATES=	aho-corasick-0.7.10 \
 		jemallocator-0.3.2 \
 		lazy_static-1.4.0 \
 		libc-0.2.71 \
+		libm-0.1.4 \
 		log-0.4.8 \
 		maybe-uninit-2.0.0 \
 		memchr-2.3.3 \
 		memmap-0.7.0 \
 		num_cpus-1.13.0 \
-		packed_simd-0.3.3 \
+		packed_simd_2-0.3.5 \
 		pcre2-0.2.3 \
 		pcre2-sys-0.2.2 \
 		pkg-config-0.3.17 \
@@ -106,6 +107,8 @@ SIMD_VARS_i386=	RUSTFLAGS+="-C target-feature=+sse2"
 
 post-patch:
 	@${REINPLACE_CMD} -e 's|OUT_DIR|RIPGREP_OUTDIR|' ${WRKSRC}/build.rs
+	@${RLN} ${CARGO_VENDOR_DIR}/packed_simd_2-* ${CARGO_VENDOR_DIR}/packed_simd
+	@${REINPLACE_CMD} 's/packed_simd_2/packed_simd/' ${CARGO_VENDOR_DIR}/packed_simd/Cargo.toml
 
 post-install:
 	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/rg
diff --git a/textproc/ripgrep/distinfo b/textproc/ripgrep/distinfo
index dfef1a466a05..480dc263218b 100644
--- a/textproc/ripgrep/distinfo
+++ b/textproc/ripgrep/distinfo
@@ -1,4 +1,4 @@
-TIMESTAMP = 1590823673
+TIMESTAMP = 1623587388
 SHA256 (rust/crates/aho-corasick-0.7.10.tar.gz) = 8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada
 SIZE (rust/crates/aho-corasick-0.7.10.tar.gz) = 111039
 SHA256 (rust/crates/atty-0.2.14.tar.gz) = d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8
@@ -47,6 +47,8 @@ SHA256 (rust/crates/lazy_static-1.4.0.tar.gz) = e2abad23fbc42b3700f2f279844dc832
 SIZE (rust/crates/lazy_static-1.4.0.tar.gz) = 10443
 SHA256 (rust/crates/libc-0.2.71.tar.gz) = 9457b06509d27052635f90d6466700c65095fdf75409b3fbdd903e988b886f49
 SIZE (rust/crates/libc-0.2.71.tar.gz) = 474209
+SHA256 (rust/crates/libm-0.1.4.tar.gz) = 7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a
+SIZE (rust/crates/libm-0.1.4.tar.gz) = 110593
 SHA256 (rust/crates/log-0.4.8.tar.gz) = 14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7
 SIZE (rust/crates/log-0.4.8.tar.gz) = 31297
 SHA256 (rust/crates/maybe-uninit-2.0.0.tar.gz) = 60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00
@@ -57,8 +59,8 @@ SHA256 (rust/crates/memmap-0.7.0.tar.gz) = 6585fd95e7bb50d6cc31e20d4cf9afb4e2ba1
 SIZE (rust/crates/memmap-0.7.0.tar.gz) = 15214
 SHA256 (rust/crates/num_cpus-1.13.0.tar.gz) = 05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3
 SIZE (rust/crates/num_cpus-1.13.0.tar.gz) = 14704
-SHA256 (rust/crates/packed_simd-0.3.3.tar.gz) = a85ea9fc0d4ac0deb6fe7911d38786b32fc11119afd9e9d38b84ff691ce64220
-SIZE (rust/crates/packed_simd-0.3.3.tar.gz) = 97485
+SHA256 (rust/crates/packed_simd_2-0.3.5.tar.gz) = 0e64858a2d3733fdd61adfdd6da89aa202f7ff0e741d2fc7ed1e452ba9dc99d7
+SIZE (rust/crates/packed_simd_2-0.3.5.tar.gz) = 98197
 SHA256 (rust/crates/pcre2-0.2.3.tar.gz) = 85b30f2f69903b439dd9dc9e824119b82a55bf113b29af8d70948a03c1b11ab1
 SIZE (rust/crates/pcre2-0.2.3.tar.gz) = 19605
 SHA256 (rust/crates/pcre2-sys-0.2.2.tar.gz) = 876c72d05059d23a84bd9fcdc3b1d31c50ea7fe00fe1522b4e68cd3608db8d5b
diff --git a/textproc/ripgrep/files/patch-packed_simd b/textproc/ripgrep/files/patch-packed_simd
deleted file mode 100644
index 4465e58d0c61..000000000000
--- a/textproc/ripgrep/files/patch-packed_simd
+++ /dev/null
@@ -1,114 +0,0 @@
-From 950903a66950eaff745b0a029f2051d305df1c22 Mon Sep 17 00:00:00 2001
-From: Justus K <justus.k at protonmail.com>
-Date: Tue, 22 Sep 2020 15:36:03 +0200
-Subject: [PATCH] Remove `x86_m8x8_sse_impl` macro
-
----
- src/codegen/reductions/mask/x86/sse.rs | 32 --------------------------
- 1 file changed, 32 deletions(-)
-
-diff --git a/src/codegen/reductions/mask/x86/sse.rs b/src/codegen/reductions/mask/x86/sse.rs
-index 7482f943..eb1ef7fa 100644
---- cargo-crates/packed_simd-0.3.3/src/codegen/reductions/mask/x86/sse.rs
-+++ cargo-crates/packed_simd-0.3.3/src/codegen/reductions/mask/x86/sse.rs
-@@ -34,35 +34,3 @@ macro_rules! x86_m32x4_sse_impl {
-         }
-     };
- }
--
--macro_rules! x86_m8x8_sse_impl {
--    ($id:ident) => {
--        impl All for $id {
--            #[inline]
--            #[target_feature(enable = "sse")]
--            unsafe fn all(self) -> bool {
--                #[cfg(target_arch = "x86")]
--                use crate::arch::x86::_mm_movemask_pi8;
--                #[cfg(target_arch = "x86_64")]
--                use crate::arch::x86_64::_mm_movemask_pi8;
--                // _mm_movemask_pi8(a) creates an 8bit mask containing the most
--                // significant bit of each byte of `a`. If all bits are set,
--                // then all 8 lanes of the mask are true.
--                _mm_movemask_pi8(crate::mem::transmute(self))
--                    == u8::max_value() as i32
--            }
--        }
--        impl Any for $id {
--            #[inline]
--            #[target_feature(enable = "sse")]
--            unsafe fn any(self) -> bool {
--                #[cfg(target_arch = "x86")]
--                use crate::arch::x86::_mm_movemask_pi8;
--                #[cfg(target_arch = "x86_64")]
--                use crate::arch::x86_64::_mm_movemask_pi8;
--
--                _mm_movemask_pi8(crate::mem::transmute(self)) != 0
--            }
--        }
--    };
--}
-From 778c0706f356118c7a5dd11c06725fc6c6b84621 Mon Sep 17 00:00:00 2001
-From: Justus K <justus.k at protonmail.com>
-Date: Tue, 22 Sep 2020 15:27:53 +0200
-Subject: [PATCH] Replace `_mm_movemask_pi8` with the fallback_impl
-
-This has to be done, because `_mm_movemask_pi8` got removed
-from stdarch in https://github.com/rust-lang/stdarch/pull/890
----
- src/codegen/reductions/mask/x86.rs | 8 +-------
- src/lib.rs                         | 1 -
- 2 files changed, 1 insertion(+), 8 deletions(-)
-
-diff --git a/src/codegen/reductions/mask/x86.rs b/src/codegen/reductions/mask/x86.rs
-index 2ae4ed81..bcfb1a6e 100644
---- cargo-crates/packed_simd-0.3.3/src/codegen/reductions/mask/x86.rs
-+++ cargo-crates/packed_simd-0.3.3/src/codegen/reductions/mask/x86.rs
-@@ -19,13 +19,7 @@ mod avx2;
- /// x86 64-bit m8x8 implementation
- macro_rules! x86_m8x8_impl {
-     ($id:ident) => {
--        cfg_if! {
--            if #[cfg(all(target_arch = "x86_64", target_feature = "sse"))] {
--                x86_m8x8_sse_impl!($id);
--            } else {
--                fallback_impl!($id);
--            }
--        }
-+        fallback_impl!($id);
-     };
- }
- 
-diff --git a/src/lib.rs b/src/lib.rs
-index c3da0d3c..cbd438c0 100644
---- cargo-crates/packed_simd-0.3.3/src/lib.rs
-+++ cargo-crates/packed_simd-0.3.3/src/lib.rs
-@@ -210,7 +210,6 @@
-     core_intrinsics,
-     stmt_expr_attributes,
-     align_offset,
--    mmx_target_feature,
-     crate_visibility_modifier,
-     custom_inner_attributes
- )]
-
-From 57d96e45916066fa9b5cdf2bc695e190207e78af Mon Sep 17 00:00:00 2001
-From: Jubilee Young <workingjubilee at gmail.com>
-Date: Wed, 23 Sep 2020 12:23:29 -0700
-Subject: [PATCH] Remove __m64 type
-
----
- src/api/into_bits/arch_specific.rs | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/src/api/into_bits/arch_specific.rs b/src/api/into_bits/arch_specific.rs
-index 6cc2fa37..7b560107 100644
---- cargo-crates/packed_simd-0.3.3/src/api/into_bits/arch_specific.rs
-+++ cargo-crates/packed_simd-0.3.3/src/api/into_bits/arch_specific.rs
-@@ -84,7 +84,6 @@ macro_rules! impl_arch {
- // FIXME: 64-bit single element types
- // FIXME: arm/aarch float16x4_t missing
- impl_arch!(
--    [x86["x86"]: __m64], [x86_64["x86_64"]: __m64],
-     [arm["arm"]: int8x8_t, uint8x8_t, poly8x8_t, int16x4_t, uint16x4_t,
-      poly16x4_t, int32x2_t, uint32x2_t, float32x2_t, int64x1_t,
-      uint64x1_t],


More information about the dev-commits-ports-all mailing list