On 24 Sep 2007, at 10:29, Sunil Amitkumar Janki wrote:
I want to know how to build Freepascal so it runs on SPARC,
MIPS(EL) and ARM GNU/Linux. For the latter two I will probably
first have to cross-build to these architectures if possible but I
don't know how to do this yet.
There is no MIPS support yet. ARM works though, although running the
compiler itself on ARM usually doesn't work because of a lack of ram
(and ARM systems are also quite slow usually).
This is the error I get when I build FPC 2.2.0 on SPARC using
FPC 2.0.0:
/opt/programming/pascal/freepascal/applications/compilers/
2/2.0/2.0.0/bin/ppcsparc -Ur -Ur -Xs -n -Xs -Fi../inc -Fi../sparc
-Fi../unix -Fisparc -FE. -FU/tmp/fpc-2.2.0/rtl/units/sparc-linux -
dsparc -dRELEASE ../objpas/rtlconsts.pp
/opt/programming/pascal/freepascal/applications/compilers/
2/2.0/2.0.0/bin/ppcsparc -Ur -Ur -Xs -n -Xs -Fi../inc -Fi../sparc
-Fi../unix -Fisparc -FE. -FU/tmp/fpc-2.2.0/rtl/units/sparc-linux -
dsparc -dRELEASE -Sg ../objpas/typinfo.pp
/opt/programming/pascal/freepascal/applications/compilers/
2/2.0/2.0.0/bin/ppcsparc -Ur -Ur -Xs -n -Xs -Fi../inc -Fi../sparc
-Fi../unix -Fisparc -FE. -FU/tmp/fpc-2.2.0/rtl/units/sparc-linux -
dsparc -dRELEASE ../objpas/math.pp
math.pp(2185,10) Error: Calling convention doesn't match forward
math.pp(2190,10) Error: Calling convention doesn't match forward
math.pp(2195,10) Error: Calling convention doesn't match forward
math.pp(2207,10) Error: Calling convention doesn't match forward
math.pp(2218,10) Error: Calling convention doesn't match forward
math.pp(2229,10) Error: Calling convention doesn't match forward
math.pp(2241,10) Error: Calling convention doesn't match forward
math.pp(2253,10) Error: Calling convention doesn't match forward
math.pp(2349) Fatal: There were 8 errors compiling module, stopping
math.pp(2349) Error: Compilation aborted
make[7]: *** [math.ppu] Error 1
Building FPC 2.2.0 is only supported starting with 2.0.4. Since there
is no 2.0.4 for sparc/linux, you will have to cross-compile it from
another platform (e.g. from linux/i386). Further, no one is currently
maintaining sparc/linux, so it might not even build (although it
should). I run a nightly test for sparc/solaris and from time to time
fix regressions for that platform, but I don't actively use it. I
fixed some sparc/linux bugs in the run-up to 2.2.0, but no longer
have access to a sparc/linux system now.
You might want to have a look at the cross building faq:
http://www.stack.nl/~marcov/buildfaq.pdf
I don't know if ARM and MIPS host support do in fact exist at all
but if not I would like to add these. I am not too knowledgeable
about ARM assembly and differences for the various versions.
I do have some experience and documents on MIPS assembly so
I should have to get by on that with the help of information across
the internet. Any help will be appreciated.
There's not really much documentation about the code generator
design. The easiest is probably to look at the sparc or arm code
generator (whichever architecture is closest), to copy them to a mips
directory and modify the copied files.
If you have specific questions, you're of course always welcome to
ask here.
Jonas
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel