Creating a crosscompiler

From Freepascal Amiga wiki
Revision as of 13:40, 13 February 2014 by Molly (talk | contribs) (Initial setup. No actual content, only lots of blah for the time being.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

First of all, this work could not have been done without the tremendous help, patience and work done by ALB42. For that he has my gratitude.

At the moment this work are some uncoherent toughts, for which the gaps are filled n during time. Although i was succesfull in creating a FreePascal windows crosscompiler for AROS, i am still trying to figure out how things work exactly, so that it would be possible to solve any issues that might popup.


  • A Linux box (alternatively this should also be possible using MinGW/MSYS)
    • ALB42's compiler sources
    • The AROS sdk
  • A Windows Box
    • The AROS binutils (mingw)
    • The AROS collect-aros tool (mingw)
  • patience


Make sure you have installed freepascal on your linux box. I used an apt-get fpc that (by default) installed freepascal 2.4.2 (a bit outdated, but should do the job).

Setting up the AROS binutils

See forum discussion. Will be explained in more detail here.

Let it all work together

Now that we've managed to setup the binutils, you should now be able to open up a shell and type the fpc command in order to compile a source. In order to compile the source for aros you should type fpc -Taros mysourcefile.pas and an aros executable would be created. You can copy this executable over to your arox box and execute your freshly compiled executable.

Things to do

  • modify the compiler so that it uses collect-aros for the linking process.
  • additionally, include collect-aros in the compiler (requires a rewrite from c)