git: 27a8f9c7a5f5 - main - misc/randomx: fix build on powerpc64le

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Wed, 29 Jan 2025 16:57:43 UTC
The branch main has been updated by pkubaj:

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

commit 27a8f9c7a5f531a7bc797a8812645bd9ce1c9c04
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2025-01-23 13:41:03 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2025-01-29 16:56:14 +0000

    misc/randomx: fix build on powerpc64le
---
 misc/randomx/Makefile                           |  2 --
 misc/randomx/files/patch-src_intrin__portable.h | 28 +++++++++++++++++++++++++
 2 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/misc/randomx/Makefile b/misc/randomx/Makefile
index 466b1d27372b..f27e8feab89a 100644
--- a/misc/randomx/Makefile
+++ b/misc/randomx/Makefile
@@ -10,8 +10,6 @@ WWW=		https://github.com/tevador/RandomX
 LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-BROKEN_powerpc64le=	compilation error: vectorized code fails to compile, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276282
-
 USES=		cmake:testing compiler:c++11-lang
 USE_LDCONFIG=	yes
 
diff --git a/misc/randomx/files/patch-src_intrin__portable.h b/misc/randomx/files/patch-src_intrin__portable.h
new file mode 100644
index 000000000000..27d6c3c462c0
--- /dev/null
+++ b/misc/randomx/files/patch-src_intrin__portable.h
@@ -0,0 +1,28 @@
+--- src/intrin_portable.h.orig	2024-01-12 23:32:27 UTC
++++ src/intrin_portable.h
+@@ -186,11 +186,11 @@ FORCE_INLINE uint32_t rx_get_rounding_mode() {
+ #undef pixel
+ #undef bool
+ 
+-typedef __vector uint8_t __m128i;
+-typedef __vector uint32_t __m128l;
+-typedef __vector int      __m128li;
+-typedef __vector uint64_t __m128ll;
+-typedef __vector double __m128d;
++typedef vector unsigned char __m128i;
++typedef vector unsigned int __m128l;
++typedef vector int      __m128li;
++typedef vector unsigned long long __m128ll;
++typedef vector double __m128d;
+ 
+ typedef __m128i rx_vec_i128;
+ typedef __m128d rx_vec_f128;
+@@ -209,7 +209,7 @@ typedef union{
+ #define rx_prefetch_t0(x)
+ 
+ /* Splat 64-bit long long to 2 64-bit long longs */
+-FORCE_INLINE __m128i vec_splat2sd (int64_t scalar)
++FORCE_INLINE __m128i vec_splat2sd (long long scalar)
+ { return (__m128i) vec_splats (scalar); }
+ 
+ FORCE_INLINE rx_vec_f128 rx_load_vec_f128(const double* pd) {