[fpc-devel] Porting FPC to IBM zArch
Bernd Oppolzer
bernd.oppolzer at t-online.de
Wed Jul 24 14:12:13 CEST 2013
Sorry, I'm sure, this is a very basic question,
just to speed up things a little ...
when I run the compiler on Windows on my test sources,
everythings works fine.
Now I wanted to build executables for OS/2 and Linux-386,
just to learn more about cross-compile. But the installed compiler-exe
(which came with Lazarus) only supports the win32 target.
The compiler message is as follows:
C:\fpc_test>ppc386 -Tos2 pasform.pas
Free Pascal Compiler version 2.6.2 [2013/06/09] for i386
Copyright (c) 1993-2012 by Florian Klaempfl and others
Target OS: OS/2
Compiling pasform.pas
Fatal: Can't find unit system used by PASFORM
Fatal: Compilation aborted
Same goes for -Tlinux
Of course, I have to build a new compiler. Or: do I misinterpret
the error message?
I downloaded the development tree using svn.
What is the easiest way to build a new compiler, and:
will it be possible to build a compiler that is able to build
different targets at the same time?
Kind regards
Bernd
Am 24.07.2013 11:46, schrieb Sven Barth:
> 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.
>
> Regards,
> Sven
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
More information about the fpc-devel
mailing list