git: 79b61461b528 - main - devel/ispc: enable on powerpc64le
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 24 Sep 2026 12:54:32 UTC
The branch main has been updated by pkubaj:
URL: https://cgit.FreeBSD.org/ports/commit/?id=79b61461b528320ffe499c3127e25d06693f0eba
commit 79b61461b528320ffe499c3127e25d06693f0eba
Author: Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2026-09-21 09:13:26 +0000
Commit: Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2026-09-24 12:53:52 +0000
devel/ispc: enable on powerpc64le
ISPC 1.31.0 added experimental ppc64le support, but enabled it only
for Linux. Add FreeBSD support as well.
ARM backend is switched off on powerpc64le, like in upstream ppc64le
CI.
---
devel/ispc/Makefile | 9 ++++++++-
devel/ispc/files/patch-cmake_CommonStdlibBuiltins.cmake | 11 +++++++++++
devel/ispc/files/patch-cmake_GenerateBuiltins.cmake | 13 +++++++++++++
devel/ispc/files/patch-cmake_GenericTargets.cmake | 11 +++++++++++
devel/ispc/files/patch-scripts_run__tests.py | 11 +++++++++++
devel/ispc/files/patch-src_ispc.cpp | 11 +++++++++++
6 files changed, 65 insertions(+), 1 deletion(-)
diff --git a/devel/ispc/Makefile b/devel/ispc/Makefile
index 7ac350489e3c..7354c2bc19a4 100644
--- a/devel/ispc/Makefile
+++ b/devel/ispc/Makefile
@@ -11,7 +11,7 @@ WWW= https://ispc.github.io/ \
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
-ONLY_FOR_ARCHS= aarch64 amd64 i386
+ONLY_FOR_ARCHS= aarch64 amd64 i386 powerpc64le
ONLY_FOR_ARCHS_REASON= only available for these architectures
BUILD_DEPENDS= ${LOCALBASE}/bin/flex:textproc/flex \
@@ -64,6 +64,13 @@ XE_PLIST_FILES= include/ispcrt/ispcrt.h \
lib/libispcrt_static.a
XE_BROKEN= Unknown architecture
+.include <bsd.port.options.mk>
+
+.if ${ARCH} == powerpc64le
+CMAKE_ON+= PPC64_ENABLED
+CMAKE_OFF+= ARM_ENABLED
+.endif
+
do-test: # all tests pass
@cd ${WRKSRC} && ISPC_HOME=${BUILD_WRKSRC}/bin ./scripts/run_tests.py
diff --git a/devel/ispc/files/patch-cmake_CommonStdlibBuiltins.cmake b/devel/ispc/files/patch-cmake_CommonStdlibBuiltins.cmake
new file mode 100644
index 000000000000..8d733a703184
--- /dev/null
+++ b/devel/ispc/files/patch-cmake_CommonStdlibBuiltins.cmake
@@ -0,0 +1,11 @@
+--- cmake/CommonStdlibBuiltins.cmake.orig 2026-06-25 04:07:31 UTC
++++ cmake/CommonStdlibBuiltins.cmake
+@@ -209,7 +209,7 @@ function (generate_stdlib_or_target_builtins func ispc
+ endif()
+
+ # PPC64 targets (Linux only, 64-bit only)
+- if (PPC64_ENABLED AND ISPC_LINUX_TARGET)
++ if (PPC64_ENABLED AND (ISPC_LINUX_TARGET OR ISPC_FREEBSD_TARGET))
+ if (${func} STREQUAL "stdlib_to_cpp")
+ foreach (os ${os_list})
+ if (${os} STREQUAL "windows")
diff --git a/devel/ispc/files/patch-cmake_GenerateBuiltins.cmake b/devel/ispc/files/patch-cmake_GenerateBuiltins.cmake
new file mode 100644
index 000000000000..93c21296399c
--- /dev/null
+++ b/devel/ispc/files/patch-cmake_GenerateBuiltins.cmake
@@ -0,0 +1,13 @@
+--- cmake/GenerateBuiltins.cmake.orig 2026-06-25 04:07:31 UTC
++++ cmake/GenerateBuiltins.cmake
+@@ -479,6 +479,10 @@ function (generate_common_builtins)
+ builtin_to_cpp(64 freebsd x86)
+ endif()
+
++ if (ISPC_FREEBSD_TARGET AND PPC64_ENABLED)
++ builtin_to_cpp(64 freebsd ppc)
++ endif()
++
+ if (ISPC_WINDOWS_TARGET AND ARM_ENABLED)
+ builtin_to_cpp(64 windows arm)
+ endif()
diff --git a/devel/ispc/files/patch-cmake_GenericTargets.cmake b/devel/ispc/files/patch-cmake_GenericTargets.cmake
new file mode 100644
index 000000000000..1afc8cca1356
--- /dev/null
+++ b/devel/ispc/files/patch-cmake_GenericTargets.cmake
@@ -0,0 +1,11 @@
+--- cmake/GenericTargets.cmake.orig 2026-06-25 04:07:31 UTC
++++ cmake/GenericTargets.cmake
+@@ -84,7 +84,7 @@ function (generate_generic_builtins ispc_name)
+ )
+ endif()
+
+- if (PPC64_ENABLED AND ISPC_LINUX_TARGET)
++ if (PPC64_ENABLED AND (ISPC_LINUX_TARGET OR ISPC_FREEBSD_TARGET))
+ list(APPEND ARCH_LIST
+ "ppc64le,64"
+ )
diff --git a/devel/ispc/files/patch-scripts_run__tests.py b/devel/ispc/files/patch-scripts_run__tests.py
new file mode 100644
index 000000000000..ff566ab88161
--- /dev/null
+++ b/devel/ispc/files/patch-scripts_run__tests.py
@@ -0,0 +1,11 @@
+--- scripts/run_tests.py.orig 2026-09-19 15:38:14 UTC
++++ scripts/run_tests.py
+@@ -1365,7 +1365,7 @@ elif platform.machine() == "arm64":
+ elif platform.machine() == "arm64":
+ default_target = "neon-i32x4"
+ default_arch = "aarch64"
+-elif platform.machine() == "ppc64le":
++elif platform.machine() == "ppc64le" or platform.processor() == "powerpc64le":
+ default_target = "generic-i32x4"
+ default_arch = "ppc64le"
+ elif "86" in platform.machine() or platform.machine() == "AMD64":
diff --git a/devel/ispc/files/patch-src_ispc.cpp b/devel/ispc/files/patch-src_ispc.cpp
new file mode 100644
index 000000000000..991e2b4967ed
--- /dev/null
+++ b/devel/ispc/files/patch-src_ispc.cpp
@@ -0,0 +1,11 @@
+--- src/ispc.cpp.orig 2026-06-25 04:07:31 UTC
++++ src/ispc.cpp
+@@ -2775,6 +2775,8 @@ llvm::Triple Target::GetTriple() const {
+ triple.setArchName("armv8a");
+ } else if (m_arch == Arch::aarch64) {
+ triple.setArchName("aarch64");
++ } else if (m_arch == Arch::ppc64le) {
++ triple.setArchName("ppc64le");
+ } else {
+ Error(SourcePos(), "Unknown arch.");
+ exit(1);