Sign in Join
Wiki copytemporary

ARM compiler options: what changed

Revision 2 to 3. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
1-## Contents
2-
3- * 1 Overview
4- * 2 ABI
5- * 3 Instruction sets
6- * 4 Floating point support
7- * 4.1 Interactions
8- * 5 Other relevant options
9- * 6 See also
10-
111## Overview
122
13-The FPC compiler lets you create (cross)compilers for various [[ARM]] instruction sets, floating point units etc.
3+The FPC compiler lets you create (cross)compilers for various [[ARM]] instruction sets, floating point units etc.
144
155Current (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>
166
17-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.
7+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.
188
199## ABI
2010
21-ABIs are selected using the -Ca switch.
22-
23-![Light bulb](https://upload.wikimedia.org/wikipedia/commons/d/d8/Nuvola_apps_ktip.png) **Note:** Normally, specifying an ABI is not needed. Source: <http://www.mail-archive.com/fpc-pascal@lists.freepascal.org/msg35496.html>
11+ABIs are selected using the -Ca switch.
2412
25- * default: ?
26- * eabi: ?
27- * EABI HF is selected using `-dFPC_ARMHF`; the `-Ca eabihf` option is present but is not necessary (but may not hurt). (Source: <http://www.mail-archive.com/fpc-pascal@lists.freepascal.org/msg35487.html>)
13+> **Note:** Normally, specifying an ABI is not needed. Source: <http://www.mail-archive.com/fpc-pascal@lists.freepascal.org/msg35496.html>
2814
29-
15+- default: ?
16+- eabi: ?
17+- EABI HF is selected using `-dFPC_ARMHF`; the `-Ca eabihf` option is present but is not necessary (but may not hurt). (Source: <http://www.mail-archive.com/fpc-pascal@lists.freepascal.org/msg35487.html>)
3018
3119## Instruction sets
3220
33-Instructions sets are selected using the `-Cp` switch. Possible instruction sets (note many sets are backward compatible):
21+Instructions sets are selected using the `-Cp` switch. Possible instruction sets (note many sets are backward compatible):
3422
35- * ARMV3
36- * ARMV4
37- * ARMV4T
38- * ARMV5
39- * ARMV5T
40- * ARMV5TEJ
41- * ARMV6: e.g. in Raspberry Pi; will probably work on most current hardware
42- * ARMV6K
43- * ARMV6T2
44- * ARMV6Z
45- * ARMV7: e.g. in Nokia N900, Nokia N9, Nokia N950
46- * ARMV7A: e.g. in Odroid U2, Odroid U3
47- * ARMV7R
48- * ARMV7M
49- * ARMV7EM
23+- ARMV3
24+- ARMV4
25+- ARMV4T
26+- ARMV5
27+- ARMV5T
28+- ARMV5TEJ
29+- ARMV6: e.g. in Raspberry Pi; will probably work on most current hardware
30+- ARMV6K
31+- ARMV6T2
32+- ARMV6Z
33+- ARMV7: e.g. in Nokia N900, Nokia N9, Nokia N950
34+- ARMV7A: e.g. in Odroid U2, Odroid U3
35+- ARMV7R
36+- ARMV7M
37+- ARMV7EM
5038
5139## Floating point support
5240
53-Floating point support coprocessor (FPU) options are selected with the `-Cf` switch Possible FPU support options:
41+Floating point support coprocessor (FPU) options are selected with the `-Cf` switch Possible FPU support options:
5442
55- * soft: softfloat/no FPU support.
56- * vfpv2: e.g. on Raspberry Pi??
57- * vfpv3: e.g. on Odroid U2, Odroid U3
58- * vfpv3_d16
43+- soft: softfloat/no FPU support.
44+- vfpv2: e.g. on Raspberry Pi??
45+- vfpv3: e.g. on Odroid U2, Odroid U3
46+- vfpv3_d16
5947
60-...
48+...
6149
6250### Interactions
6351
64-Below adapted from: [[1]](<http://www.mail-archive.com/fpc-devel@lists.freepascal.org/msg28056.html>)
52+Below adapted from: [1](http://www.mail-archive.com/fpc-devel@lists.freepascal.org/msg28056.html)
6553
66- * armel and armhf indicate how floating point (fp) values are passed.
67- * Armel means that all floating point values are always passed in integer registers.
68- * Armhf means that fp values are generally passed in floating point registers. As indicated above, armhf is settable by `-dFPC_ARMHF`; see above)
54+- armel and armhf indicate how floating point (fp) values are passed.
55+ - Armel means that all floating point values are always passed in integer registers.
56+ - Armhf means that fp values are generally passed in floating point registers. As indicated above, armhf is settable by `-dFPC_ARMHF`; see above)
6957
70- * The softfp/vfpv2 distinction for armel indicates how the fp operations are performed.
71- * Softfp means that all fp operations are performed by software
72- * 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.
58+- The softfp/vfpv2 distinction for armel indicates how the fp operations are performed.
59+ - Softfp means that all fp operations are performed by software
60+ - 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.
7361
74-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.
62+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.
7563
7664## Other relevant options
7765
78- * If you are using FPC 2.7.1+ and want to speed up floating point, you can also specify `-OoFASTMATH` to sacrifice precision for performance.
66+- If you are using FPC 2.7.1+ and want to speed up floating point, you can also specify `-OoFASTMATH` to sacrifice precision for performance.
7967
8068## See also
8169
82- * [[Setup Cross Compile For ARM]]
70+- [[Setup Cross Compile For ARM]]
8371
8472---
85-*From the Free Pascal wiki, page "ARM compiler options", as the Internet Archive kept it on 2024-05-28. 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](/wiki-contact).*
73+*From the Free Pascal wiki, page "ARM compiler options", as it stood on 2014-07-11 after a change by BigChimp, 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](/wiki-contact).*
74+Category: ARM
75+Category: FPC

Back to history