]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
ggml : revert to -lm linking instead of find_library (llama/22355)
authorAdrien Gallouët <redacted>
Tue, 28 Apr 2026 06:56:02 +0000 (08:56 +0200)
committerGeorgi Gerganov <redacted>
Thu, 30 Apr 2026 08:29:21 +0000 (11:29 +0300)
commitca624d86abdbb9f332850227fc02d4b2f6d4f10e
treeb12c39c6dd17b40b799b9e68036e479e06f25d3b
parent70e4c0aec058a27f7abf0df1dd7a9660ba3bd4a0
ggml : revert to -lm linking instead of find_library (llama/22355)

* ggml : revert to -lm linking instead of find_library

`find_library(MATH_LIBRARY m)` was introduced recently, but it breaks
CUDA compilation with GGML_STATIC. I could not find any valid use case
where we would prefer `find_library` over the standard `-lm` approach.

This commit is also meant to start a discussion if there is a valid
reason to keep `find_library(MATH_LIBRARY m)`, we should clarify what
problem it was solving and find an alternative fix that does not break
CUDA with GGML_STATIC.

Signed-off-by: Adrien Gallouët <redacted>
* ggml : use MATH_LIBRARY only if defined

Signed-off-by: Adrien Gallouët <redacted>
* ggml : fix initial broken condition

Signed-off-by: Adrien Gallouët <redacted>
* ggml : always respect MATH_LIBRARY when defined

Signed-off-by: Adrien Gallouët <redacted>
---------

Signed-off-by: Adrien Gallouët <redacted>
ggml/src/CMakeLists.txt