Order of the Butterfly
Posts: 347 from 2003/10/12
From: 1 AU, EU, DE/HU
Quote:
just curious. is it possible to crosscompile on a linuxmachine for morphos with fpc?
Not out of the box in its current state, but in theory, it is possible. When MorphOS port was started, it was crosscompiled from Linux/PPC (and even from Linux/x86) in early times. But that was a manual crosscompile process, which means i compiled every single .pas file in the compiler and in the runtime libs to assembly files, copied to the MOS machine, then assembled and linked it by hand. And repeated this a couple of dozen times while debugging, and implementing stuff. :) That's how the first functional MOS and OS4 compilers were made.
In the years passed since, Free Pascal got a much more comfortable cross-compilation infrastructure. There are official crosscompilers released now, for example for various embedded (ARM based) architectures. But MorphOS port currently (due to lack of time) doesn't really support this cross-compilation architecture.
To cross compile with FPC you'd need:
* gnu assembler running on the host platform (eg. Linux), capable of compiling MorphOS objects
* vlink or GNU ld running on the host platform (eg. Linux), and capable of linking MorphOS executables
* some poking into the MorphOS platform support (compiler/systems/t_morph.pas, IIRC), to support assembling and linking on non-MorphOS systems.
* some Makefile regeneration mess, to support the above changes
Basically, that's it.
Easy, huh?
Anyway, why would you need to crosscompile to compile Ultrastar Deluxe? If the required APIs would be there, MOS compiler just could compile it happily. But the required APIs are not there (at least not all of them i guess), and crosscompiling won't change this...
[ Edited by Chain-Q on 2008/10/9 10:43 ]