You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resolve link ordering and scope link libs per target
Keep link-time libraries out of CFLAGS so they land AFTER the object/archive
inputs on each link line. GNU ld with --as-needed (the Debian/Ubuntu default)
drops a library placed before the inputs that reference it, leaving libm
(sqrt/pow/ceil) and pthread_* (from the threadsafe libsqlite3) undefined.
See #84 and #93.
Scope the libraries per target: the loadable extension is just sqlite-vec.c,
which references libm but no raw pthread/dl symbols (SQLite is resolved by the
host at load time), so it links libm only via LOADABLE_LIBS. dl and pthread
stay in LINK_LIBS for the targets that embed the threadsafe SQLite amalgamation
(cli, static-into-exe, test-unit). This also fixes Android/Bionic cross-builds,
which run on a Linux host (CONFIG_LINUX) but have no standalone libpthread.
0 commit comments