I'm using the following two scripts, which build i386 target of FPC trunk and then Lazarus trunk (which is why it downloads some packages and creates missing symlinks):
Thanks, that brought me one step further, but its not working in Lazarus, yet.
After running the fpc-prepare-x32.sh script, compilation with
"sudo make clean all CPU_TARGET=i386" was successful and also the fpc-build-x32.sh script went through smoothly.
Unfortunately, Lazarus still prompted the message :
"Compiler "/usr/bin/fpc" does not support target"
I tried some steps according this thread:
http://forum.lazarus.freepascal.org/index.php/topic,28012.0.htmlI.e., added these lines in /usr/fpc.cfg:
#ifdef i386
-Fu/usr/local/lib/fpc/$fpcversion/units/$fpctarget
-Fu/usr/local/lib/fpc/$fpcversion/units/$fpctarget/*.
-Fu/usr/local/lib/fpc/$fpcversion/units/$fpctarget/rtl
#endif
ppc386 was missing in /usr/lib/fpc/3.0.0, so the symlink in /usr/bin was without target.
I found ppc386 in the fpcsrc folder under /usr/share/fpcsrc/3.0.0/compiler and created a symlink in /usr/bin to there (Perhaps thats the wrong way to do it?).
Compiling the test program
http://wiki.lazarus.freepascal.org/Cross_compiling#Test_cross_compilerin the shell with
fpc -Tlinux -Pi386 test.pas
was successful and possible to run!
When opening Lazarus the message "Compiler "/usr/bin/fpc" does not support target" was not shown anymore -> good! When I tried to compile it stopped with the message:
"Cant find process used by RegisterFCL of package FCL."
I guess that has something to do with the missing ppc386 file in /usr/lib/fpc/3.0.0?
Thanks for help!
PS: The script fpc-prepare-x32.sh seems not to download FPC and Lazarus. To run the second script I copied the folder /usr/share/fpcsrc/3.0.0 to a desktop-folder and renamed it to fpc to run the script fpc-build-x32.sh. fpc and fpc-src were installed by this time.
EDIT: I found a file named ppcross386 in /usr/local/lib/fpc/3.0.0/. Is there a relation to ppc386?