Difference between revisions of "Platform defines"
From Lazarus wiki
Jump to navigationJump to search (→Operating system defines: where FPC runs) |
(Undo revision 100604 by Kai Burghardt (talk) (April fools)) |
||
Line 118: | Line 118: | ||
|- | |- | ||
|DARWIN||OS X, iOS | |DARWIN||OS X, iOS | ||
− | |||
− | |||
|- | |- | ||
|FREEBSD||FreeBSD | |FREEBSD||FreeBSD | ||
Line 141: | Line 139: | ||
|PALMOS||Palm OS, Garnet OS | |PALMOS||Palm OS, Garnet OS | ||
|} | |} | ||
− | |||
− | |||
== See also == | == See also == |
Revision as of 13:34, 2 April 2016
Useful tips before using platform defines
- http://www.stack.nl/~marcov/buildfaq.pdf - general building guidelines
- http://www.stack.nl/~marcov/porting.pdf - general porting guidelines
- if you need to cast a pointer to an integer for arithmetic or you want to provide a spare field (like tag in Tcomponent) that may be used to store a pointer use ptrint as signed type, or better ptruint as 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 |
CPUAVR | AVR 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
Note: This is a copy of the official FPC documentation which is the authorative version for the stable FPC version.
define(s) | meaning |
---|---|
General | |
BSD | *BSD and OS X |
UNIX | any UNIX or UNIX-like system, including Linux, BSD, Solaris and OS X. |
MSWINDOWS | all variants of Windows except Windows CE/Windows Mobile |
WINDOWS | all variants of Windows |
Specific | |
AMIGA | Amiga OS |
ATARI | Atari TOS |
LINUX | Linux |
BEOS | BeOS |
BSD | BSD OS X, iOS |
MACOS | Classic Mac OS (System 7 etc) |
DARWIN | OS X, iOS |
FREEBSD | FreeBSD |
NETBSD | NetBSD |
SOLARIS | Solaris |
SUNOS | SunOS, Solaris |
UNDER_CE | Windows CE, Windows mobile |
WIN32 | 32 bit Windows |
WIN64 | 64 bit Windows |
WINCE | Windows CE, Windows mobile |
GO32V2 | MS DOS (using go32v2 extender) |
PALMOS | Palm OS, Garnet OS |
See also
- http://delphi.wikia.com/wiki/FreePascal_detection_and_versioning
- Free Pascal Documentation: Appendix G: Compiler defines during compilation
Directives, definitions and conditionals definitions |
---|
global compiler directives • local compiler directives Conditional Compiler Options • Conditional compilation • Macros and Conditionals • Platform defines |