From 0791fda43e6d9e4f146ff5d7213738c20ef7a7f1 Mon Sep 17 00:00:00 2001 From: Will Anderson Date: Mon, 4 May 2026 19:14:09 -0500 Subject: [PATCH] =?UTF-8?q?elb:=20add=20-lm=20to=20link=20flags=20?= =?UTF-8?q?=E2=80=94=20el=5Fruntime.c=20uses=20math.h=20functions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit el_runtime.c includes and calls pow(), sqrt(), log() in several places (math operations, engram dampening, float formatting). Without -lm the linker fails on Linux when linking programs built with elb. --- elb.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elb.el b/elb.el index 4cd1d4c..af878e7 100644 --- a/elb.el +++ b/elb.el @@ -270,7 +270,7 @@ fn link_binary(c_files: [String], out_bin: String, runtime_path: String, out_dir let i = i + 1 } let parts = native_list_append(parts, runtime_path) - let parts = native_list_append(parts, "-lcurl -lpthread") + let parts = native_list_append(parts, "-lcurl -lpthread -lm") let parts = native_list_append(parts, "-o " + out_bin) let cmd: String = str_join(parts, " ") println(" link " + out_bin)