[fpc-devel] Porting FPC to IBM zArch

Sven Barth pascaldragon at googlemail.com
Wed Jul 24 11:46:01 CEST 2013

Am 24.07.2013 03:41, schrieb Bernd Oppolzer:
> - when I completed this, I would like to experiment with FPC, trying 
> to build a compiler
> from the source tree, for a new target CPU and OS, that is, IBMZ. I 
> know enough about
> IBM machine code, ASSEMBLER, opsys and run time systems. In contrast 
> to the discussions
> that I saw already (targetting zLinux with ASCII codebase), I plan to 
> build a FPC compiler
> which works on BOTH codebases - I want to know, where the issues are.
You should split this into two steps (which is the usual approach):
- first create a cross compiler; thus a compiler which compiles Pascal 
programs for IBMZ. This way you can implement the RTL and do testsuite runs
- once the cross compiler and the programs it compiles runs satisfactory 
you can try to compile the compiler for IBMZ

You'll also need either cross binutils (e.g. i386-linux -> 
whatever-ibmz) (containing "as" and "ld") or you'll need to write your 
own assembler writer and a linker (or you'll need to use "assemble on 
target" option). For the first step the first variant is suggested.
On the IBMZ itself you'll also need to have binutils available except 
you decide to use an internal assembler/linker.
Note: you don't necessarily need GNU assembler and linker, but otherwise 
you'll need to write support for it in the compiler.


More information about the fpc-devel mailing list