Revision 3 of 3, by WikiArchive on 11-10-2026. The page as it is now.
Platform defines
Useful tips before using platform defines
- Marco van de Voort: Development Tutorial (a.k.a Build FAQ) – general building guidelines
- Marco van de Voort: Creating a portable Pascal codebase. – general porting guidelines
- if you need to cast a pointer to an integer for arithmetic or you want to provide a spare field (like
taginTComponent) that may be used to store a pointer, usePtrIntas signed type, or betterPtrUIntas unsigned type.
Architecture defines
Note: This is a copy of the official FPC documentation which is the authorative version for the stable FPC version.
| define(s) | meaning |
|---|---|
| General | |
| ENDIAN_BIG | big endian |
| ENDIAN_LITTLE | little endian |
| CPU16 | 16 bit CPU |
| CPU32 | 32 bit CPU |
| CPU64 | 64 bit CPU |
| Specific | |
| CPU86 | Intel 8086 and compatible (original PC) |
| CPU87 | Intel 8086 and compatible (original PC) |
| CPU386, CPUi386 | 386 and compatible (32 bit PC) |
| CPUAMD64, CPUX86_64 | AMD64 or Intel 64-bit processor |
| CPUIA64 | Intel itanium 64-bit processor |
| CPU68 | Motorola 680x0 or compatible CPU |
| CPU68K, CPUM68K | Motorola 680x0 or compatible CPU |
| CPUM68020 | Motorola 68020 or compatible CPU |
| CPUPOWERPC | PowerPC processor (32 or 64 bit) |
| CPUPOWERPC32 | PowerPC processor (32 bit) |
| CPUPOWERPC64 | PowerPC processor (64 bit) |
| CPUSPARC, CPUSPARC32 | SPARC v7 or compatible |
| CPUARM | ARM 32 bit processor |
| CPUAARCH64 | ARM 64 bit processor |
| CPUAVR | AVR 8/16-bit processor |
| FPU | |
| FPUSOFT | Software emulation of FPU (all types) |
| FPUSSE64 | SSE64 FPU on Intel I386 and higher, AMD64. |
| FPUSSE | SSE instructions on Intel I386 and higher. |
| FPUSSE2 | SSE 2 instructions on Intel I386 and higher. |
| FPUSSE3 | SSE 3 instructions on Intel I386 and higher, AMD64. |
| FPULIBGCC | GCC library FPU emulation on ARM and M68K. |
| FPU68881 | 68881 on M68K. |
| FPUFPA | FPA on ARM. |
| FPUFPA10 | FPA 10 on ARM. |
| FPUFPA11 | FPA 11 on ARM. |
| FPUVFP | VFP on ARM. |
| FPUX87 | X87 FPU on Intel I386 and higher. |
| FPUITANIUM | On Intel Itanium. |
| FPUSTANDARD | On PowerPC (32/64 bit). |
| FPUHARD | On Sparc. |
Operating system defines
In the following tree, you have to follow leaves to their respective roots, in order to determine all defines. To check this information, refer to files in FPC sources: "compiler/systems/i_*.pas".
ATARIDPMI: MS-DOSGO32V2WATCOM
EMACSembeddedHASAMIGAAMIGAAMIGA68KAMIGAOS4
AROSMorphOS
GBA: GameBoy AdvanceJavaMACOS: Classic Macintosh (System 7 etc.)MSDOSMS-DOS 16-bit real mode (defined since FPC version 2.7.1)NATIVENT: NativeNTNDS: Nintendo DSNETWARE: NetWareNETWARE_CLIB: NetWare with classic libcNETWLIBC,NETWARE_LIBC: NetWare with modern libc
OS2: OS/2EMX: emx
PALMOS: PalmOS and Garnet OSSymbian: Symbian OSUNIXWDOSXWiiWINDOWS: all WindowsMSWINDOWSWIN16: 16-bit Windows 3.xWIN32: 32-bit WindowsWIN64: 64-bit Windows
WINCE,UNDER_CE,UNICODE: Windows CE, Windows mobile
Notes
UNICODE was defined till FPC 3.0.0, see User changes 3.0 § “define UNICODE was changed to FPC_OS_UNICODE”.
See also
- Delphi Wikia article “FreePascal detection and versioning”
- Free Pascal Documentation: Appendix G: Compiler defines during compilation
From the Free Pascal wiki, page "Platform defines", as it stood on 2021-04-01 after a change by Kai Burghardt, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.
