+ggml (0.9.4.185-1) unstable; urgency=medium
+
+ * Upstream llama.cpp and whisper.cpp syncs
+ * Move backends to Debian location
+ * Build natively for Raspberry Pi5 on Ubuntu ARM
+
+ -- Mathieu Baudier <mbaudier@argeo.org> Tue, 11 Nov 2025 07:55:58 +0000
+
ggml (0.9.4.58-1) unstable; urgency=medium
* Upstream llama.cpp sync
1 file changed, 4 insertions(+)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 892c233..cef289b 100644
+index f30e4ac..44a9fdd 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
-@@ -418,5 +418,9 @@ if (BUILD_SHARED_LIBS)
+@@ -434,5 +434,9 @@ if (BUILD_SHARED_LIBS)
set_target_properties(${target} PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_compile_definitions(${target} PRIVATE GGML_BUILD)
target_compile_definitions(${target} PUBLIC GGML_SHARED)
#export DH_VERBOSE = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+# Derivative
+distribution := $(shell lsb_release --id --short)
+distrel := $(shell lsb_release --codename --short)
+derivative := $(shell if dpkg-vendor --derives-from Ubuntu; then echo Ubuntu; \
+ elif dpkg-vendor --derives-from Debian; then echo Debian; \
+ else echo Unknown; fi)
+ifeq ($(distrel),n/a)
+ distrel := sid
+endif
+
# For multiarch
include /usr/share/dpkg/architecture.mk
# For DEB_VERSION_UPSTREAM
-DGGML_BUILD_TESTS=OFF \
-DGGML_BUILD_EXAMPLES=OFF \
-DGGML_BACKEND_DL=ON \
+ -DGGML_BACKEND_DIR=/usr/lib/${DEB_HOST_MULTIARCH}/ggml/backends0 \
# Common backends
CMAKE_OPTS += -DGGML_RPC=ON \
CMAKE_OPTS += -DGGML_VULKAN=ON
endif
-# Optimize for Raspberry Pi 5
ifeq ($(DEB_TARGET_ARCH),arm64)
+ifeq ($(distribution),ubuntu)
+# Optimize for Raspberry Pi 5 on Ubuntu
CMAKE_OPTS += -DGGML_CPU_ALL_VARIANTS=OFF \
- -DGGML_CPU_ARM_ARCH=armv8.2-a+crypto+fp16+rcpc+dotprod
-
+ -DGGML_NATIVE
+else
+CMAKE_OPTS += -DGGML_CPU_ALL_VARIANTS=OFF \
+ -DGGML_CPU_ARM_ARCH=armv8.0-a
+endif
else
CMAKE_OPTS += -DGGML_CPU_ALL_VARIANTS=ON
-DCUDAToolkit_ROOT=/usr
endif
-endif # aarch64
+endif # arm64
# Use build/ for output, so that it is in the .gitignore of upstream
%:
override_dh_auto_configure:
dh_auto_configure -- $(CMAKE_OPTS)
-execute_after_dh_auto_install-arch:
- # Move backends *.so to libexec, as we don't want them lurking in /usr/bin
- mkdir -p debian/tmp/usr/libexec/$(DEB_TARGET_MULTIARCH)/ggml
- for file in debian/tmp/usr/bin/libggml-*.so; do \
- mv $$file debian/tmp/usr/libexec/$(DEB_TARGET_MULTIARCH)/ggml; \
- done
-
override_dh_installexamples:
dh_installexamples --exclude=.gitignore