On 3/17/23 15:19, Sven Barth via lazarus wrote:
Depending on the used units static linking is simply not an option. E.g.
the database units load the database libraries dynamically and thus the
C library must not be linked statically then.
glibc officially highly discourages static linking anyway.
As a sidenote, with gcc it is easy to cherry pick which libraries will
be linked statically and which dynamically, but from what i can tell FPC
doesn't seem to provide such an option - there is only an all or nothing
approach as FPC generates its own linker scripts. It'd be useful if
there was a way to explicitly specify (e.g. via command line options)
which libraries are meant to be linked statically (and/or the opposite)
regardless of $linklib usage (as libraries can come through unit you
depend on indirectly - e.g. i might want to statically link SDL but not
X11 or glibc).
Kostas
--
_______________________________________________
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus