Enabling crosscompiling from Windows towards Darwin
Original Reporter info from Mantis: DonAlfredo @DonAlfredo
-
Reporter name: Alfred
Original Reporter info from Mantis: DonAlfredo @DonAlfredo
- Reporter name: Alfred
Description:
After the Makefile changes (thanks for that) as a result of solving:
http://bugs.freepascal.org/view.php?id=30964
some more changes are needed to be able to cross from Windows to Darwin.
Included are patches for script.pas and t_bsd.pas that allow the use of osxcross to cross from Windows to Darwin.
See:
https://github.com/tpoechtrager/osxcross
https://github.com/LongDirtyAnimAlf/osxcross
http://wiki.lazarus.freepascal.org/fpcupdeluxe#Crosscompiling_from_Windows_towards_Darwin
However, the changes are not osxcross-centric. But the changes will allow for the use of osxcross.
Most important change in these patches: a link-list (linkfiles.res) is used when linking files on Windows.
Additional information:
Some more changes are needed when implementing the patches:
fpcmake.inc : linkfiles.res has to be added
delp.pp : linkfiles.res has to be added
fpccfg.inc
This is non-trivial.
-ap is default for Darwin, but cannot be used when crossing from Windows towards Darwin. Adding #IFNDEF FPC_CROSSCOMPILING will solve for crossing from Windows, but could cause failures when crossing from Linux.
At the moment, I do not know how to get the underlying system when cross-compiling.
Patches have been tested on various systems ... no regressions detected.
Mantis conversion info:
- Mantis ID: 31099
- OS: Windows
- OS Build: Win10
- Build: trunk
- Platform: x86_64
- Version: 3.1.1
- Fixed in revision: 36168 (#fa75f25f)
- Monitored by: » @xhajt03 (Tomas Hajny), » @sergey.bychkow (Sergey Bychkow)