ARM compiler options
The FPC compiler lets you create (cross)compilers for various ARM instruction sets, floating point units etc.
Current (FPC 2.6.x/2.7.x) compilers (and RTL PPUs etc) are built for just one ABI and cannot output other ABIs once built - e.g. adding
-dFPC_ARMHF when compiling
a program will not change anything: http://lists.freepascal.org/lists/fpc-devel/2013-May/032093.html
The options below are passed in OPTS= when building FPC. When building a cross compiler, some of them can/should be passed in CROSSOPT as well.
ABIs are selected using the -Ca switch.
- default: ?
- eabi: ?
- EABI HF is selected using
-Ca eabihfoption is present but is not necessary (but may not hurt). (Source: http://firstname.lastname@example.org/msg35487.html)
Instructions sets are selected using the
Possible instruction sets (note many sets are backward compatible):
- ARMV6: e.g. in Raspberry Pi; will probably work on most current hardware
- ARMV7: e.g. in Nokia N900, Nokia N9, Nokia N950
- ARMV7A: e.g. in Odroid U2, Odroid U3
Floating point support
Floating point support coprocessor (FPU) options are selected with the
Possible FPU support options:
- soft: softfloat/no FPU support.
- vfpv2: e.g. on Raspberry Pi??
- vfpv3: e.g. on Odroid U2, Odroid U3
Below adapted from: 
- armel and armhf indicate how floating point (fp) values are passed.
- Armel means that all floating point values are always passed in integer registers.
- Armhf means that fp values are generally passed in floating point registers. As indicated above, armhf is settable by
-dFPC_ARMHF; see above)
- The softfp/vfpv2 distinction for armel indicates how the fp operations are performed.
- Softfp means that all fp operations are performed by software
- vfpv2, vfpv3 means that fp operations are performed by the hardware. Although fp values are still passed in integer registers, they're copied to fp registers before performing the operation.
From an ABI point of view softfp and vfpv2 are compatible. However, vfpv2 executables will crash if run on a processor not having vfpv2 hardware.
Other relevant options
- If you are using FPC 2.7.1+ and want to speed up floating point, you can also specify
-OoFASTMATHto sacrifice precision for performance.