I am planning to write a library in FPC that can be linked to from other compilers. Dynamic linking (.so, .dll) is no issue, however, the requirement of static linking from (at least) gcc and/or clang has come up.
Somehow, in the end, I need an object archive containing all FPC internal functions, correct? Linking to libc (cmem, cthreads etc.) instead of FPCs implementation appears to be a requirement, but what else would be the most effective and cross-platform way to achieve this?
FPC used is 2.7(trunk).
Thanks in advance.
EDIT: some progress has been made here (german, also see the linked repo in my comment there), but it strikes me as not really elegant nor simple. Also there remains the issue Marco brought up about initialization/finalization...