[fpc-devel] Crosscompiling win towards darwin

Alfred alfred at consulab.nl
Wed Nov 23 11:58:40 CET 2016

Follow up.

To enable cross from Windows towards Darwin, some changes in FPC were 
They have been added into NewPascal, and can be found here:
Not meant to be 100% correct, but working.


New rtl-makefile for Darwin.

Some small changes in script.pas were needed to generate valid Windows 
batch-code for Darwin.

Changes in t_bsd.pas were more than trivial.
The Windows Darwin linker does not allow pipes. So, it needs a res that 
has to be serialized on the command line. But Windows limits the length 
of the command line to 8196 characters. Which is not enough when linking 
a lot of files in different directories. So the filelist option has to 
be used on Windows. Files are added into this filelist, the rest remains 
in res.
This also means that the default fpc.cfg does not work anymore, due to 
the default -ap switch for Darwin. This does not work on Windows.

A very minor patch was added into the crosstools to allow the successful 
find of files that are needed by the linker.

Thanks again for your help.

More information about the fpc-devel mailing list