PDA

View Full Version : FPC or GCC



AirPas
16-04-2012, 03:43 PM
i was thinking which is more multi-platform and multi-cpu fpc or gcc , isn't gcc ?

code_glitch
16-04-2012, 04:06 PM
Depends. The truth of the matter is that nowadays, GCC is the root of compilation for virtually every device out there that doesnt sport an MS logo... However, dont forget that FPC will compile for virtually any architecture out there (assuming you mean multi cpu architecture by 'multi-cpu'), be it ARM, X86, X64, PowerPC, PowerPC64 and SPARC as well as a few others if I recall...

To quote FPC themselves...


Intel x86, Amd64/x86_64, PowerPC, PowerPC64, Sparc, ARM. The discontinued 1.0 version also supports the Motorola 680x0. The following operating systems are supported: Linux, FreeBSD, Haiku, Mac OS X/Darwin, DOS, Win32, Win64, WinCE, OS/2, Netware (libc and classic) and MorphOS.


Which in other words, means virtually everybody, and even where there is no 'official' support for a specific setup, theres often ways to get it running on Gameboys and DSs... So the bttom line for me would be - sure, GCC may compile for more stuff, but FPC will get you to 99% of your market anyway.... The only 'gap' in FPC's capability I can find would be the latest consoles, EG 360 and PS3 as well as the PSP. But its going strong virtually everywhere else :) Besides, nothing says you cant compile your library for the architecture in FPC and 'import' it into a


#include YourPascalProgram.dll
int main ()
{
RunPascalProgram();
}

I know you dont use a #include for that guys, its header files only, but you get the idea :)

Andru
16-04-2012, 05:09 PM
Without any doubts - GCC. Even take such platform as Android. FreePascal by default doesn't support it and needs some third party patches.

AirPas
16-04-2012, 08:52 PM
It is noted that the difference is clear , however fpc still has a long way to improve a lot of things