[fpc-devel]Building the PalmOS cross compiler...

Jonas Maebe jonas at zeus.rug.ac.be
Tue Sep 4 12:52:22 CEST 2001


On zaterdag, september 1, 2001, at 05:17 , Julia A. Case wrote:

> I'd like to build the PalmOS cross compiler under linux, but I'll be if
> I can figure out how to do it.  I tried setting the enviornment
> variables CPU_TARGET and OS_TARGET but that didn't help...

You have to make sure you have a cross-assembler and cross-linker. Once 
you've compiled (or downloaded) those, put them in some directory and 
pass that directory to the compiler using the -FD option. I think it's 
also the easiest to pass te CPU_TARGET and OS_TARGET environment vars 
directly to make. So supppose you created a cross-assembler and 
cross-linker which you put in ~/palmutils, first use

make CPU_TARGET=m68k OS_TARGET=palmos

in the compiler dir. This will create a cross-compiler for palmos.

Next, move the resulting compiler (ppc68k) somewhere else (e.g. to 
~/palmutils) and compile the RTL by going to the RTL dir and typing

make  OPT="-FD~/palmutils" FPC="~/palmutils/ppc68k"

Finally, when you want to cross-compile something use

ppc68k -FD~/palmutils file.pas

You can also put a

#ifdef m68k
-FD~/palmutils
#endif

in your ~/.ppc386.cfg so that you don't have to add the -FD parameter 
every time by hand.


Jonas




More information about the fpc-devel mailing list