Sign in Join
Wiki copytemporary

ARM compiler options: what changed

Revision 1 to 2. 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
212
3-The FPC compiler lets you create (cross)compilers for various [[ARM]] instruction sets, floating point units etc.
13+The FPC compiler lets you create (cross)compilers for various [[ARM]] instruction sets, floating point units etc.
414
515Current (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>
616
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.
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.
818
919## ABI
1020
11-ABIs are selected using the -Ca switch.
21+ABIs are selected using the -Ca switch.
1222
13-> **Note:** Normally, specifying an ABI is not needed. Source: <http://www.mail-archive.com/fpc-pascal@lists.freepascal.org/msg35496.html>
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>
1424
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>)
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>)
1828
29+
30+
1931## Instruction sets
2032
21-Instructions sets are selected using the `-Cp` switch. Possible instruction sets (note many sets are backward compatible):
33+Instructions sets are selected using the `-Cp` switch. Possible instruction sets (note many sets are backward compatible):
2234
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
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
3850
3951## Floating point support
4052
41-Floating point support coprocessor (FPU) options are selected with the `-Cf` switch Possible FPU support options:
53+Floating point support coprocessor (FPU) options are selected with the `-Cf` switch Possible FPU support options:
4254
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
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
4759
48-...
60+...
4961
5062### Interactions
5163
52-Below adapted from: [1](http://www.mail-archive.com/fpc-devel@lists.freepascal.org/msg28056.html)
64+Below adapted from: [[1]](<http://www.mail-archive.com/fpc-devel@lists.freepascal.org/msg28056.html>)
5365
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)
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)
5769
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.
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.
6173
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.
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.
6375
6476## Other relevant options
6577
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.
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.
6779
6880## See also
6981
70-- [[Setup Cross Compile For ARM]]
82+ * [[Setup Cross Compile For ARM]]
7183
7284---
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
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).*

Back to history