[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 
needed.
They have been added into NewPascal, and can be found here:
https://github.com/newpascal/freepascal/commit/a99fe9054957d2c42c780c4d05e59c6fbda31621
Not meant to be 100% correct, but working.

Summary:

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.
https://github.com/LongDirtyAnimAlf/osxcross/commit/44235f030ab49167bb5e7ddf323d4a1793f74cdf

Thanks again for your help.




More information about the fpc-devel mailing list