[Lazarus] Cross compiler

Sven Barth pascaldragon at googlemail.com
Mon May 27 19:28:01 CEST 2013


Am 27.05.2013 14:51 schrieb "Antonio Fortuny" <a.fortuny at sitasoftware.lu>:
 > Because I develop for Win32, Win64, WinCE (win32 based) and Linux 
x86_64, to have one signle development platform would be a charm. I 
think this is still a dream and there is a long way.

In this situation the best solution would be to use Linux x86_64 as the 
base system. Win32 and Win64 cross compilers can be easily built using

make crossall crossinstall OS_TARGET=win32 CPU_TARGET=i386 
INSTALL_PREFIX=/wherever/you/have/your/fpc/installed
make crossall crossinstall OS_TARGET=win64 CPU_TARGET=x86_64 
INSTALL_PREFIX=/wherever/you/have/your/fpc/installed

For WinCE you'll need cross binutils from Linux to WinCE and then you 
can build the cross compiler using this:

make crossall crossinstall OS_TARGET=wince CPU_TARGET=arm 
CROSSBINDIR=/path/to/binutils BINUTILSPREFIX=arm-wince- 
INSTALL_PREFIX=/wherever/you/have/your/fpc/installed

Whereby CROSSBINDIR is only necessary if the directory is not in PATH 
and BINUTILSPREFIX needs to be adjusted to whatever your binutils use. 
These settings need to be applied to the compiler configuration or 
command line when compiling as well... (as -FD/path/to/binutils and 
-XParm-wince- respectively)

Regards,
Sven




More information about the Lazarus mailing list