[fpc-devel] how to build FPC for armel

Jonas Maebe jonas.maebe at elis.ugent.be
Sat Dec 12 00:33:56 CET 2009

On 12 Dec 2009, at 01:14, darekm at emadar.com wrote:

> this is good (mentioned bug goes off) configuration
> make crossinstall CPU_TARGET=arm OS_TARGET=linux
> CROSSBINDIR=/home/darek2008/fpcarm/arm-linux-uclibc/bin
> INSTALL_PREFIX=/home/darek2008/fpcarm COMPILER_OPTIONS="cpufpemu -a"

Always first do a "make clean all" before doing any kind of install. Directly doing a "make install" or "make crossinstall" without doing a regular "make all" first is not supported. Also, when building a cross-compiler, make sure that you start with a native compiler built from the same FPC revision, because when building a cross-compiler the native compiler will not be fully cycled first.

This is how I built my cross-compiler (ppn40 is a native i386 compiler):

make FPC=~/afshome/bin/ppn40 OPT="-dFPC_ARMEL" CROSSOPT="-XParm-linux-gnueabi- -FD/home/jmaebe/crosstest/bin -dFPC_ARMEL -Cfsoft -Xd -O2" CPU_TARGET=arm all -j 2

I don't understand what your COMPILER_OPTIONS parameter is for. The "cpufpemu" will be interpreted by the compiler as the name of a source file (and subsequently be overridden by the real source file that comes after it), and "-a" tells the compiler to leave the generated assembler files behind. You can just as well use OPT="-a".


More information about the fpc-devel mailing list