(response to various FPC comments, but I need more space)
For a good understanding, you need to know that delphi.dcu is translated into two different .ppu FPC files with the mentioned symtable material, which includes unrelated code, such as built-in functions and general definitions, and .o, which is compatible with mingw (COFF ) on Windows. Cygwin is also compatible with the connection level (but the runtime is different and scary). In any case, mingw32 / 64 is our gcc link to Windows.
PPU has a similar version, such as Delphi DCU, possibly for the same reasons. The ppu format differs in almost every major release. (so 2.0, 2.2, 2.4) and usually changes 2-3 times a year in the trunk
So, while the FPC on Windows uses its own assemblers and linkers, the ones generated by it .o are still compatible with mingw32. In general, FPC output is very compatible with gcc, and often can be directly linked in gcc static libs, which allows, for example, mysql and postgres linklibs to connect to applications with a suitable license. (e.g. GPL). In 64-bit versions, they should also be compatible, but this is probably less tested than win32.
The text IDE even links in the entire GDB debugger in the form of a library. GDB is one of the main reasons for gcc compatibility on Windows.
While Barry points to overall runtime for FPC, it might be a little easier to get around this. This may require only calling certain functions to initialize FPC rtl from your startup code, as well as to complete. Compile a minimal FPC program with -al and look at the assembler (in the .s file, first of all, initialization and finalization). In addition, RTL is more flexible and probably more easily knocked to a minimum.
Of course, as soon as you also need exceptions to work through gcc β fpc bounderies, you're out of luck. FPC does not use SEH, or any scheme compatible with any other ATM. (contrary to Delphi, which uses SEH, which at least theoretically should give you an edge there, Barry?) OTOH, gcc can use its own libunwind instead of SEH.
Note that the standard x86 FPC calling convention is Delphi compatible register, so you may need to insert the correct cdecl modifiers (which must be gcc compatible) or even set it for whole units at a time using {$ call Cdecl}
On * nix is ββa standard swamp (for example, Apache modules), I do not know many people who do this on win32.
About compatibility; FPC can compile packages like Indy, Teechart, Zeos, ICS, Synapse, VST and more with or without a lot of movements. Dialect levels of released versions are a combination of D7 and higher, with an emphasis on D7. The dialect level slowly increases to the D2006 level in trunk versions. (with inclusion, annotations, etc.)