git: 7256f19af7d0 - main - textproc/redisearch2: fix build on powerpc64*
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 19 Oct 2026 09:32:12 UTC
The branch main has been updated by pkubaj:
URL: https://cgit.FreeBSD.org/ports/commit/?id=7256f19af7d0e6b307dba905e6117cb2d0f6d429
commit 7256f19af7d0e6b307dba905e6117cb2d0f6d429
Author: Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2026-10-18 16:19:03 +0000
Commit: Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2026-10-19 09:26:38 +0000
textproc/redisearch2: fix build on powerpc64*
VectorSimilarity falls back to the x86 cpu_features types on anything that
isn't aarch64. Add a generic fallback for everything else.
---
...-deps_VectorSimilarity_src_VecSim_spaces_spaces.h | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/textproc/redisearch2/files/patch-deps_VectorSimilarity_src_VecSim_spaces_spaces.h b/textproc/redisearch2/files/patch-deps_VectorSimilarity_src_VecSim_spaces_spaces.h
new file mode 100644
index 000000000000..96a2d8dc23b4
--- /dev/null
+++ b/textproc/redisearch2/files/patch-deps_VectorSimilarity_src_VecSim_spaces_spaces.h
@@ -0,0 +1,20 @@
+--- deps/VectorSimilarity/src/VecSim/spaces/spaces.h.orig 2026-10-18 15:13:16 UTC
++++ deps/VectorSimilarity/src/VecSim/spaces/spaces.h
+@@ -36,9 +36,15 @@ static inline auto getCpuOptimizationFeatures(const vo
+ #if defined(CPU_FEATURES_ARCH_AARCH64)
+ using FeaturesType = cpu_features::Aarch64Features;
+ constexpr auto getFeatures = cpu_features::GetAarch64Info;
+-#else
+- using FeaturesType = cpu_features::X86Features; // Fallback
++#elif defined(CPU_FEATURES_ARCH_X86_64)
++ using FeaturesType = cpu_features::X86Features;
+ constexpr auto getFeatures = cpu_features::GetX86Info;
++#else
++ // No architecture-specific implementations exist for this CPU: there are
++ // no features to detect and the generic implementation is always chosen.
++ struct FeaturesType {};
++ struct NoFeaturesInfo { FeaturesType features; };
++ constexpr auto getFeatures = []() { return NoFeaturesInfo{}; };
+ #endif
+ return arch_opt ? *static_cast<const FeaturesType *>(arch_opt) : getFeatures().features;
+ }