summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2025-08-03 01:30:01 +0200
committerPiotr Kubaj <pkubaj@FreeBSD.org>2025-08-03 23:39:02 +0200
commit3c66acbc5c97d47ef07c855846f27c3c4944e70a (patch)
tree68645435d28b5fabccfdc515266f7af0064b24e8
parentmisc/pytorch: fix plist on non-amd64 (diff)
misc/py-llama-cpp-python: fix build on powerpc64*
/wrkdirs/usr/ports/misc/py-llama-cpp-python/work-py311/llama-cpp-python-0.3.2/vendor/llama.cpp/ggml/src/ggml-cpu/llamafile/sgemm.cpp:1659:1: error: unknown type name '_Bool' 1659 | bool llamafile_sgemm(int64_t m, int64_t n, int64_t k, const void *A, int64_t lda, const void *B, int64_t ldb, void *C, | ^ /wrkdirs/usr/ports/misc/py-llama-cpp-python/work-py311/llama-cpp-python-0.3.2/vendor/llama.cpp/ggml/src/ggml-cpu/./ggml-cpu-impl.h:323:14: note: expanded from macro 'bool' 323 | #define bool _Bool | ^ 4 warnings and 1 error generated.
-rw-r--r--misc/py-llama-cpp-python/files/patch-vendor_llama.cpp_ggml_src_ggml-cpu_ggml-cpu-impl.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/misc/py-llama-cpp-python/files/patch-vendor_llama.cpp_ggml_src_ggml-cpu_ggml-cpu-impl.h b/misc/py-llama-cpp-python/files/patch-vendor_llama.cpp_ggml_src_ggml-cpu_ggml-cpu-impl.h
new file mode 100644
index 000000000000..376142c64242
--- /dev/null
+++ b/misc/py-llama-cpp-python/files/patch-vendor_llama.cpp_ggml_src_ggml-cpu_ggml-cpu-impl.h
@@ -0,0 +1,11 @@
+--- vendor/llama.cpp/ggml/src/ggml-cpu/ggml-cpu-impl.h.orig 2025-08-02 23:17:06 UTC
++++ vendor/llama.cpp/ggml/src/ggml-cpu/ggml-cpu-impl.h
+@@ -319,8 +319,6 @@ inline static int32x4_t ggml_vdotq_s32(int32x4_t acc,
+ #else
+ #ifdef __POWER9_VECTOR__
+ #include <altivec.h>
+-#undef bool
+-#define bool _Bool
+ #else
+ #if defined(_MSC_VER) || defined(__MINGW32__)
+ #include <intrin.h>