[fpc-devel] ARMHF a separate CPU? Why?

Vsevolod Alekseyev sevaa at sprynet.com
Sat Mar 8 16:40:35 CET 2014

Does Free Pascal really treat ARMHF as a separate CPU target, distinct from regular ARM? May I ask why such design? In the grand symphony of native code generation, the floating point calling convention sounds, to me, as a much smaller detail than, for example, ARM vs Thumb or PIC vs. non-PIC or floating point mode per se. Yet the latter features are mere options within the ARM target.
Was this done so that you can have several instances of ARM RTL side by side and switch between them seamlessly?
But you can anyway. I, for example, am building my project for the two official flavors of Android (armeabi and armeabi-v7a). The RTL for the former was built with all default options and resides under units\arm-android. The RTL for the latter was built with CROSSOPT="-CpARMV7A -CfVFPV3_D16" and resides under units\armv7-android. In order to build the project for V7A, I provide the following extra options to FPC:
-n -Fu$(FPCUNITS)/armv7-android/*
And it works as expected. Could've accomplished the same with some editing of fpc.cfg. What I'm saying here, there are too many flavors of ARM out there that are actually in use by devices and platforms; introducing an extra CPU type does a poor job of providing support for all of them anyway.

More information about the fpc-devel mailing list