git: 85dcb27e810b - main - security/highwayhash: drop VSX requirement for powerpc64
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 11 Sep 2026 12:50:09 UTC
The branch main has been updated by pkubaj:
URL: https://cgit.FreeBSD.org/ports/commit/?id=85dcb27e810bc00f05a98850e5be693c86b93f0e
commit 85dcb27e810bc00f05a98850e5be693c86b93f0e
Author: Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2026-09-03 08:11:51 +0000
Commit: Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2026-09-11 12:49:13 +0000
security/highwayhash: drop VSX requirement for powerpc64
On BE VSX backend produces wrong results anyway, this also makes
the package usable on G5.
---
security/highwayhash/Makefile | 6 ++--
security/highwayhash/files/patch-Makefile | 29 ++++++++++++++++++--
.../files/patch-highwayhash_instruction__sets.h | 32 ++++++++++++++++++++++
3 files changed, 62 insertions(+), 5 deletions(-)
diff --git a/security/highwayhash/Makefile b/security/highwayhash/Makefile
index 109fbf48241e..bd209fea27cf 100644
--- a/security/highwayhash/Makefile
+++ b/security/highwayhash/Makefile
@@ -1,5 +1,6 @@
PORTNAME= highwayhash
PORTVERSION= g20240418
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= security
@@ -22,8 +23,9 @@ GH_TAGNAME= f8381f3
.include <bsd.port.options.mk>
-.if ${ARCH:Mpowerpc*}
-CXXFLAGS+= -mpower8-vector
+.if ${ARCH} == powerpc64le
+MAKE_ENV+= HH_POWER=1 HH_VSX=1
+.elif ${ARCH:Mpowerpc*}
MAKE_ENV+= HH_POWER=1
.elif ${ARCH} == aarch64 || ${ARCH:Marmv*}
MAKE_ENV+= HH_ARM=1
diff --git a/security/highwayhash/files/patch-Makefile b/security/highwayhash/files/patch-Makefile
index d6ba3a52f0e6..06a41b2afcfe 100644
--- a/security/highwayhash/files/patch-Makefile
+++ b/security/highwayhash/files/patch-Makefile
@@ -1,11 +1,34 @@
---- Makefile.orig 2020-04-29 18:43:05 UTC
+--- Makefile.orig 2024-04-18 09:56:24 UTC
+++ Makefile
@@ -1,7 +1,7 @@
# We assume X64 unless HH_POWER, HH_ARM, or HH_AARCH64 are defined.
-
+
override CPPFLAGS += -I.
-override CXXFLAGS += -std=c++11 -Wall -O3 -fPIC -pthread
+override CXXFLAGS += -std=c++11 -Wall -fPIC -pthread
override LDFLAGS += -pthread
-
+
PREFIX ?= /usr/local
+@@ -39,8 +39,10 @@ HH_AARCH64 = 1
+ else
+ ifdef HH_POWER
+ HH_X64 =
++ifdef HH_VSX
+ HIGHWAYHASH_OBJS += obj/hh_vsx.o
+ HIGHWAYHASH_TEST_OBJS += obj/highwayhash_test_vsx.o
++endif
+ else
+ HH_X64 = 1
+ HIGHWAYHASH_OBJS += obj/hh_avx2.o obj/hh_sse41.o
+@@ -95,9 +97,11 @@ obj/benchmark.o: CXXFLAGS+=-mavx2
+ endif
+
+ ifdef HH_POWER
++ifdef HH_VSX
+ obj/highwayhash_test_vsx.o: CXXFLAGS+=-mvsx
+ obj/hh_vsx.o: CXXFLAGS+=-mvsx
+ obj/benchmark.o: CXXFLAGS+=-mvsx
++endif
+ # Skip file - vector library/test not supported on PPC
+ obj/vector_test_target.o: CXXFLAGS+=-DHH_DISABLE_TARGET_SPECIFIC
+ obj/vector_test.o: CXXFLAGS+=-DHH_DISABLE_TARGET_SPECIFIC
diff --git a/security/highwayhash/files/patch-highwayhash_instruction__sets.h b/security/highwayhash/files/patch-highwayhash_instruction__sets.h
new file mode 100644
index 000000000000..9a8e5b0f6918
--- /dev/null
+++ b/security/highwayhash/files/patch-highwayhash_instruction__sets.h
@@ -0,0 +1,32 @@
+--- highwayhash/instruction_sets.h.orig 2024-04-18 09:56:24 UTC
++++ highwayhash/instruction_sets.h
+@@ -38,7 +38,11 @@ class InstructionSets {
+ static TargetBits Supported();
+ #elif HH_ARCH_PPC
+ static HH_INLINE TargetBits Supported() {
++#ifdef __LITTLE_ENDIAN__
+ return HH_TARGET_VSX | HH_TARGET_Portable;
++#else
++ return HH_TARGET_Portable;
++#endif
+ }
+ #elif HH_ARCH_NEON
+ static HH_INLINE TargetBits Supported() {
+@@ -64,7 +68,7 @@ class InstructionSets {
+ Func<HH_TARGET_SSE41>()(std::forward<Args>(args)...);
+ return HH_TARGET_SSE41;
+ }
+-#elif HH_ARCH_PPC
++#elif HH_ARCH_PPC && defined(__LITTLE_ENDIAN__)
+ const TargetBits supported = Supported();
+ if (supported & HH_TARGET_VSX) {
+ Func<HH_TARGET_VSX>()(std::forward<Args>(args)...);
+@@ -96,7 +100,7 @@ class InstructionSets {
+ if (supported & HH_TARGET_SSE41) {
+ Func<HH_TARGET_SSE41>()(std::forward<Args>(args)...);
+ }
+-#elif HH_ARCH_PPC
++#elif HH_ARCH_PPC && defined(__LITTLE_ENDIAN__)
+ if (supported & HH_TARGET_VSX) {
+ Func<HH_TARGET_VSX>()(std::forward<Args>(args)...);
+ }