[fpc-devel] Help on building crosscompiler with fpc 2.3.1

Terry Kemp tkemp at klc.net.nz
Sat Sep 27 00:02:15 CEST 2008


On Fri, 2008-09-26 at 19:09 +0200, Lukas Gradl wrote:
> Marco van de Voort schrieb:
> > In our previous episode, Lukas Gradl said:
> >> At the moment, I'm developing on a i386 Linux machine. For some servers 
> >> I need x86_64 binaries, so I have a second machine with x86_64 linux I 
> >> use just for compiling.
> >>
> >> It would be great to compile everything on one machine, so I tried to 
> >> build a crosscompiler for x86_64 on my i386 machine. The Wikipage on 
> >> http://wiki.lazarus.freepascal.org/Cross_compiling doesn't work anymore 
> >> - make is complaining about a missing ppcrossx86_64 almost immediatly.
> > 
> > Please be more detailed. What command do you run in which directory, with
> > what version as starting compiler?
> 
> I have (for simplifying I use X86_64 to compile i386 as described in the 
> wiki):
> fpc 2.3.1 built from svn running on a Kubuntu X86_64 machine
> (Source got via svn checkout http://svn.freepascal.org/svn/fpc/trunk fpc)
> 
> I want:
> compiling i386 binaries on that machine
> 
> I did (according to http://wiki.lazarus.freepascal.org/Cross_compiling):
> 
> created i386-linux-ld and i386-linux-as as described in the Wiki
> 
> cd /path-to-fpc-source-root/
> 
> make all CPU_TARGET=i386
> 
> I get:
> Makefile:129: *** Compiler ppcross386 not found.
> 
> What I could not find was, how to create that ppcross386. I remember it 
> worked with a previous 2.2.0 install, but since I switched to 2.3.1 I 
> couldn't get it to work.
> 
> regards
> Lukas
> 

For arm I needed to add FPC=fpc at end of command.

make all CPU_TARGET=i386 FPC=[path to fpc executable] (if not in path).

Seems it looks for the crosscompiler to exist first? because if it does
you dont need this - but it will make a new one. go figure.

Terry







More information about the fpc-devel mailing list