FPC(FreePascal) uses the GNU tools, look at FPC's code and you'll see how it does it, it compiles the .o .a .ppu files and uses the GNU linker(crossplatform) to make executables and/or .dll/.so.