From c9b18fedd361924523e444fb7bd861492559b632 Mon Sep 17 00:00:00 2001 From: liweigang Date: Thu, 27 Feb 2025 15:58:35 +0800 Subject: [PATCH] add sw_64 and mips64el support Signed-off-by: liweigang --- ...p-uos-add-sw_64-and-mips64el-support.patch | 23 +++++++++++++++++++ chatglm.cpp.spec | 8 ++++--- 2 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 100-chatglm-cpp-uos-add-sw_64-and-mips64el-support.patch diff --git a/100-chatglm-cpp-uos-add-sw_64-and-mips64el-support.patch b/100-chatglm-cpp-uos-add-sw_64-and-mips64el-support.patch new file mode 100644 index 0000000..f41f0d9 --- /dev/null +++ b/100-chatglm-cpp-uos-add-sw_64-and-mips64el-support.patch @@ -0,0 +1,23 @@ + +From ef2834f066161131c170a900e87fd9329f879eb9 Mon Sep 17 00:00:00 2001 +From: maqi +Date: Wed, 20 Nov 2024 07:11:59 +0800 +Subject: [PATCH] add sw_64 snd mips64el support +--- + third_party/ggml/src/ggml.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/third_party/ggml/src/ggml.c b/third_party/ggml/src/ggml.c +index 2374287..a7d55a4 100644 +--- a/third_party/ggml/src/ggml.c ++++ b/third_party/ggml/src/ggml.c +@@ -299,7 +299,7 @@ typedef double ggml_float; + #if defined(_MSC_VER) || defined(__MINGW32__) + #include + #else +-#if !defined(__riscv) && !defined(__loongarch64) ++#if !defined(__riscv) && !defined(__loongarch64) && !defined(__sw_64__) && !defined(__mips64) + #include + #endif + #endif +-- +2.39.3 diff --git a/chatglm.cpp.spec b/chatglm.cpp.spec index 32cc5b4..2225821 100644 --- a/chatglm.cpp.spec +++ b/chatglm.cpp.spec @@ -2,16 +2,15 @@ Name: chatglm-cpp Version: 0.2.4 -Release: 5 +Release: 6 License: MIT Summary: Port of Chinese lagre model ChatGLM-6B & ChatGLM2-6B implemented based on C/C++ URL: https://github.com/li-plus/chatglm.cpp Source0: https://github.com/li-plus/chatglm.cpp/releases/download/0.2.4/chatglm-cpp-%{version}.tar.gz -%ifarch loongarch64 Patch0: 0001-Fix-build-error-for-loongarch64.patch -%endif +Patch1: 100-chatglm-cpp-uos-add-sw_64-and-mips64el-support.patch BuildRequires: gcc,gcc-c++,cmake Requires: sentencepiece @@ -51,6 +50,9 @@ popd /usr/lib/static/libggml.a %changelog +* Thu Feb 27 2025 liweigang - 0.2.4-6 +- add sw_64 and mips64el support + * Fri May 17 2024 zhangzikang - 0.2.4-5 - Fix build error for loongarch64 -- Gitee