Files
MINGW-packages/mingw-w64-koboldcpp/0002-use-system-deps.patch
2026-01-17 12:06:09 +07:00

40 lines
3.2 KiB
Diff

diff -bur koboldcpp-1.105.4-orig/Makefile koboldcpp-1.105.4/Makefile
--- koboldcpp-1.105.4-orig/Makefile 2026-01-16 00:51:39.480147600 -0700
+++ koboldcpp-1.105.4/Makefile 2026-01-16 00:56:42.740754300 -0700
@@ -55,8 +55,8 @@
CFLAGS += -fsanitize=undefined -fsanitize-undefined-trap-on-error
CXXFLAGS += -fsanitize=undefined -fsanitize-undefined-trap-on-error
endif
-CFLAGS += -I. -Iggml/include -Iggml/src -Iggml/src/ggml-cpu -Iinclude -Isrc -I./common -I./vendor -I./vendor/stb -I./include -I./include/CL -I./otherarch -I./otherarch/tools -I./otherarch/sdcpp -I./otherarch/ttscpp/include -I./otherarch/ttscpp/src -I./otherarch/sdcpp/thirdparty -I./include/vulkan -O3 -fno-finite-math-only -std=c11 -fPIC -DLOG_DISABLE_LOGS -D_GNU_SOURCE -DGGML_USE_CPU -DGGML_USE_CPU_REPACK
-CXXFLAGS += -I. -Iggml/include -Iggml/src -Iggml/src/ggml-cpu -Iinclude -Isrc -I./common -I./vendor -I./vendor/stb -I./include -I./include/CL -I./otherarch -I./otherarch/tools -I./otherarch/sdcpp -I./otherarch/ttscpp/include -I./otherarch/ttscpp/src -I./otherarch/sdcpp/thirdparty -I./include/vulkan -O3 -fno-finite-math-only -std=c++17 -fPIC -DLOG_DISABLE_LOGS -D_GNU_SOURCE -DGGML_USE_CPU -DGGML_USE_CPU_REPACK
+CFLAGS += -I. -Iggml/include -Iggml/src -Iggml/src/ggml-cpu -Iinclude -Isrc -I./common -I./vendor -I./vendor/stb -I./include -I./otherarch -I./otherarch/tools -I./otherarch/sdcpp -I./otherarch/ttscpp/include -I./otherarch/ttscpp/src -I./otherarch/sdcpp/thirdparty -I$(MINGW_PREFIX)/include/CL -I$(MINGW_PREFIX)/include/openblas -I$(MINGW_PREFIX)/include/vulkan -O3 -fno-finite-math-only -std=c11 -fPIC -DLOG_DISABLE_LOGS -D_GNU_SOURCE -DGGML_USE_CPU -DGGML_USE_CPU_REPACK
+CXXFLAGS += -I. -Iggml/include -Iggml/src -Iggml/src/ggml-cpu -Iinclude -Isrc -I./common -I./vendor -I./vendor/stb -I./include -I./otherarch -I./otherarch/tools -I./otherarch/sdcpp -I./otherarch/ttscpp/include -I./otherarch/ttscpp/src -I./otherarch/sdcpp/thirdparty -I$(MINGW_PREFIX)/include/CL -I$(MINGW_PREFIX)/include/openblas -I$(MINGW_PREFIX)/include/vulkan -O3 -fno-finite-math-only -std=c++17 -fPIC -DLOG_DISABLE_LOGS -D_GNU_SOURCE -DGGML_USE_CPU -DGGML_USE_CPU_REPACK
ifndef KCPP_DEBUG
CFLAGS += -DNDEBUG -s
diff -bur koboldcpp-1.105.4-orig/Makefile koboldcpp-1.105.4/Makefile
--- koboldcpp-1.105.4-orig/Makefile 2026-01-16 01:03:18.807541400 -0700
+++ koboldcpp-1.105.4/Makefile 2026-01-16 01:07:20.889227300 -0700
@@ -425,10 +425,10 @@
endif
ifdef LLAMA_CLBLAST
-CLBLAST_BUILD = $(CXX) $(CXXFLAGS) $^ lib/OpenCL.lib lib/clblast.lib -shared -o $@.dll $(LDFLAGS)
+CLBLAST_BUILD = $(CXX) $(CXXFLAGS) $^ $(MINGW_PREFIX)/lib/libOpenCL.dll.a $(MINGW_PREFIX)/lib/libclblast.dll.a -shared -o $@.dll $(LDFLAGS)
endif
ifdef LLAMA_VULKAN
-VULKAN_BUILD = $(CXX) $(CXXFLAGS) $^ lib/vulkan-1.lib -shared -o $@.dll $(LDFLAGS)
+VULKAN_BUILD = $(CXX) $(CXXFLAGS) $^ $(MINGW_PREFIX)/lib/libvulkan-1.dll.a -shared -o $@.dll $(LDFLAGS)
endif
ifdef LLAMA_CUBLAS
@@ -981,7 +981,7 @@
#window simple clinfo
simpleclinfo: simpleclinfo.cpp
- $(CXX) $(CXXFLAGS) $^ lib/OpenCL.lib lib/clblast.lib -o $@ $(LDFLAGS)
+ $(CXX) $(CXXFLAGS) $^ $(MINGW_PREFIX)/lib/libOpenCL.dll.a $(MINGW_PREFIX)/lib/libclblast.dll.a -o $@ $(LDFLAGS)
simplecpuinfo: simplecpuinfo.cpp
$(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS)