Lazarus is lacking crosscompiling ability(?)
Erik van Pienbroek
erik at vanpienbroek.nl
Fri Dec 2 11:05:34 UTC 2011
Heiko Adams schreef op vr 02-12-2011 om 01:40 [+0100]:
> I'm not very experienced in crosscompiling applications but as far as
> I understand lazarus wiki page for that topic, lazarus is able to
> compile i.e. windows binaries on linux.
> I'm currently in a situation where this feature would be very helpful
> because it gets boring and costs some time for me to start my windows
> vm just for a new build of my applications. I've allready filed a
> bug for making feodra's lazarus package able to compile windows
> binaries but there isn't any reaction so far.
> So can anyone give me a hint how I can compile my lazarus applications
> for windows on my linux box without using a windows vm and why the
> lazarus package seems to miss the neccessary files for doing this out
> of the box?
>  https://bugzilla.redhat.com/show_bug.cgi?id=756486
Forwarding your mail to the Fedora MinGW mailing list.
The Fedora MinGW SIG currently has an infrastructure ready which allows
easy cross compilation of packages for the win32 target using the
I'm not really familiar with lazarus, but I'm willing to help out
wherever I can. I just took a quick look at the wiki page you mentioned.
As I see it now there are 3 steps involved in builder a lazarus cross
compiler for the win32 target:
1. build binutils for the win32 target
2. build the lazarus fpc compiler for the win32 target
3. configure the lazarus fpc.cfg
Step 1 is already provided by the Fedora MinGW SIG. We've got the
mingw32-binutils package which contains the various binutils tools for
the win32 target. The only real differences I've found so quick are the
name of the build target and the installation location.
In the fpc buildcrossbinutils script the build target 'i686-mingw32' is
used while all Fedora MinGW packages use 'i686-pc-mingw32' (and once the
mingw-w64 toolchain is approved for inclusion in Fedora this will be
changed to 'i686-w64-mingw32' and 'x86_64-w64-mingw32', see  for more
details about that). The mingw32-binutils binaries are all placed in
For step 2 I think you need to extract the interesting instructions from
the lazarus buildcrosssnaphot script and merge them in a .spec file. I
think it should be pretty straightforward to do so.
Step 3 doesn't tell me much, but I guess the current lazarus package
ships a fpc.cfg and this file needs to be changed to be aware of the
win32 fpc target.
If you need any help with the above steps you can always join our IRC
channel at #fedora-mingw on FreeNode and we'll try to help you as much
Erik van Pienbroek
Fedora MinGW SIG
More information about the devel