[fpc-pascal] Cross compile from x86 to Pi
Karoly Balogh (Charlie/SGR)
charlie at scenergy.dfmk.hu
Sun Aug 16 03:40:43 CEST 2015
Hi,
On Sat, 15 Aug 2015, Chris Moody wrote:
> Is there a better guide on how to do this than:
> http://wiki.freepascal.org/fpcup#Linux_ARM_cross_compiler ? specifically as far as this
> sentence is concerned:
>
> * Linux/Unix build or install the relevant crossbinutils (Linux, unix)
With Ubuntu/Debian:
- apt-get install binutils-arm-linux-gnueabihf
The various binutils executables will be available then as
arm-linux-gnueabihf-*, so you need to use parameter
-XParm-linux-gnueabihf- when invoking the compiler.
If you're using a different Linux distribution, look up a similar package
in your distribution, most bigger distros provide cross-binutils packages
these days for ARM.
You can also build cross-binutils from source, but that's not FPC specific
at all. Among many others, this GCC cross-howto explains how to build a
cross binutils (see chapter 1):
http://preshing.com/20141119/how-to-build-a-gcc-cross-compiler/
But on the RPi, instead of TARGET=aarch64-linux one has to use
TARGET=arm-linux-gnueabihf, if I'm correct.
Charlie
More information about the fpc-pascal
mailing list