Forum > Unix

[SOLVED] Compiling for ARM

<< < (2/3) > >>

DonAlfredo:
ARMHF for Linux and ARMEL for Android go together !

Starchild:
ppcrossarm -CpARMv6 -darm -Tlinux -CfSoft hello2.pp

--- Code: ---Free Pascal Compiler version 3.0.2-r35401 [2017/11/14] for arm
Copyright (c) 1993-2017 by Florian Klaempfl and others
Error: You must use a FPU type of VFPV2, VFPV3 or VFPV3_D16 when using the EABIHF ABI target

--- End code ---
(Used stable instead of trunk for testing here)

I was like "okay let's try vfpv2 anyway even though it won't work" --> I don't get "Killed" anymore, but "Illegal instruction". The compiler produced an ARMv7a binary which will not run on the ARM11 processor (I guess because vfpv2 is meaningless in ARMv6). On the Android phone (which has a much more modern processor) it runs though!
So to target an ARMEL Linux I actually need to use the android compiler? That's quite confusing, but I'll give it a try...

DonAlfredo:
Put
-dFPC_ARMEL in FPC options.
-CpARMV6 -CfSoft in cross-options.
Build crosscompiler.
Perhaps it will work.

Starchild:
Ah excellent!  :)
That did it. The soft floats are also working fine according to some small tests I did.

One final question: With these options it's still using the arm-linux-gnueabihf-* binutils. Will the fact that those are gnueabihf and not gnueabi possibly bite me in the ass sometime? Things I might wanna do later on include statically linking C objects, dynamically linking against C libraries, writing libraries that C binaries will link against.

DonAlfredo:
FPC won't bite you anymore.
Its just the libs and the binary tools.

If the libs bite you: copy over the libs of your target system into the correct cross/lib-directory.
If the bins bite you: just let me know; I will try to build the correct ones and add them for fpcupdeluxe.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version