Subject: [bug#71219] [PATCH] gnu: llama-cpp: Update configure flags for shared library build.

From: Andy Tai <[email-masked]>
Date: Sun, 26 May 2024 22:16:48 -0700

* gnu/packages/machine-learning.scm (lama-cpp):
  [arguments](configure-flags): add cmake configure flag
  to force position independent code generation from C
  compiler for shared library build.

Change-Id: I7c4bc219a22aa9a949e811b340c7cf745b176d14
---
 gnu/packages/machine-learning.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index a385ddc18c..398b42f203 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -541,7 +541,8 @@ (define-public llama-cpp
       (build-system cmake-build-system)
       (arguments
        (list
-        #:configure-flags #~'("-DLLAMA_BLAS=ON"
+        #:configure-flags #~'("-DCMAKE_POSITION_INDEPENDENT_CODE=TRUE"
+                              "-DLLAMA_BLAS=ON"
                               "-DLLAMA_BLAS_VENDOR=OpenBLAS"
 
                               "-DLLAMA_NATIVE=OFF" ;no '-march=native'

base-commit: 0f3a25a25e212bfa8ab9db37d267fb260a087e5d
-- 
2.34.1