[fpc-pascal] FPCUP Windows now has Go32V2 cross compiling support

Reinier Olislagers reinierolislagers at gmail.com
Fri Sep 20 18:42:14 CEST 2013


Hi list,

Recent posts have lead me to look again at my FPC/Lazarus
downloader/compiler fpcup [1] to see if I could get cross compiling
going from win64 or win64 to Go32v2.

This works for me:
1) Setup:
Create directory c:\development
Get crosscompile binutils from
ftp://ftp.freepascal.org/pub/fpc/contrib/cross/mingw/binutils-2.20-win32-i386-go32v2.zip
Place the binaries in c:\development\cross\bin\i386-go32v2

Binaries include
i386-go32v2-ar.exe
i386-go32v2-as.exe
i386-go32v2-ld.exe
i386-go32v2-objdump.exe
i386-go32v2-strip.exe

2) Let fpcup compile a new FPC and Lazarus:
fpcup

3) Then do a cross compile; note this does require the cross compilation
binutils but fpcup will warn you if they're missing
fpcup --cputarget=i386 --ostarget=go32v2

Fpcup will give a warning about missing support for LCL/Lazarus which is
expected as there's no LCL for Go32V2.

4) Start the installed Lazarus, create a simple program/console program,
in Project Options, set target OS to go32v2 and target CPU to i386.
Compile.

5) Remember to distribute cwsdpmi.exe with your programs.
http://homer.rice.edu/~sandmann/cwsdpmi/index.html
download:
http://homer.rice.edu/~sandmann/cwsdpmi/csdpmi7b.zip
Starting dosbox, running cwsdpmi and then a hello world .exe worked fine.

As usual: comments/suggestions welcome.

Thanks,
Reinier

[1]
https://bitbucket.org/reiniero/fpcup/downloads



More information about the fpc-pascal mailing list