[fpc-pascal] Could use some help with DOS cross compile

Reinier Olislagers reinierolislagers at gmail.com
Sun Oct 20 17:31:33 CEST 2013


On 20/10/2013 13:27, Nikolay Nikolov wrote:
> On 10/20/2013 01:56 PM, Reinier Olislagers wrote:
>> Trying to create dos cross compiler using FPC trunk x86 r25833, Windows
>>
>> NASM binaries etc from Marco's post [2]
>> dir c:\Development\cross\bin\i8086-msdos
>> ..
>> 02/01/2013  11:06           743,424 msdos-nasm.exe
>> 25/05/2010  08:36            33,792 msdos-wlib.exe
>> 25/05/2010  08:51            33,792 msdos-wlink.exe
>> 02/01/2013  11:06           743,424 nasm.exe
>> 25/05/2010  08:36           172,018 wlibd.dll
>> 25/05/2010  08:51           395,646 wlinkd.dll
>> 25/05/2010  08:51            13,604 wlsystem.lnk

Ok, this now runs without error:
rem DOS binutils first, then trunk compiler+binutils
set
path=C:\development\cross\bin\i8086-msdos;C:\Development\fpctrunk\bin\i386-win32
cd /d c:\development\fpctrunk
rmdir /s /q c:\development\fpctrunk\units\msdos
rem clean
C:\development\fpcbootstrap\make.exe
"FPC=C:\development\fpcbootstrap\ppc386.exe"
"--directory=C:\development\fpctrunk"
"INSTALL_PREFIX=C:\development\fpctrunk"
"CROSSBINDIR=C:\development\cross\bin\i8086-msdos" "UPXPROG=echo"
"COPYTREE=echo" "clean" "OS_TARGET=msdos" "CPU_TARGET=i8086"
"BINUTILSPREFIX=msdos-" "OPT=-CX -XXs" "CROSSOPT=-XPmsdos- -WmMedium"
rem make all
C:\development\fpcbootstrap\make.exe
"FPC=C:\development\fpcbootstrap\ppc386.exe"
"--directory=C:\development\fpctrunk"
"INSTALL_PREFIX=C:\development\fpctrunk"
"CROSSBINDIR=C:\development\cross\bin\i8086-msdos" "UPXPROG=echo"
"COPYTREE=echo" "all" "OS_TARGET=msdos" "CPU_TARGET=i8086"
"BINUTILSPREFIX=msdos-" "OPT=-CX -XXs" "CROSSOPT=-XPmsdos- -WmMedium"
rem make crossinstall;
C:\development\fpcbootstrap\make.exe
"FPC=C:\development\fpcbootstrap\ppc386.exe"
"--directory=C:\development\fpctrunk"
"INSTALL_PREFIX=C:\development\fpctrunk"
"CROSSBINDIR=C:\development\cross\bin\i8086-msdos" "UPXPROG=echo"
"COPYTREE=echo" "crossinstall" "OS_TARGET=msdos" "CPU_TARGET=i8086"
"BINUTILSPREFIX=msdos-" "OPT=-CX -XXs" "CROSSOPT=-XPmsdos- -WmMedium"


type c:\Development\fpctrunk\bin\i386-win32\fpc.cfg
...
# fpcup do not remove i8086-msdos
#cross compile settings dependent on both target OS and target CPU
#IFDEF CPUI8086
#IFDEF MSDOS
# Inserted by fpcup 16:39:16

-FDC:\development\cross\bin\i8086-msdos\
-XPmsdos-
-WmMedium

#ENDIF
#ENDIF

However this:
fpc -Pi8086 -TMSDOS d:\cop\t\test.pas
gives
Free Pascal Compiler version 2.7.1 [2013/10/20] for i8086
Copyright (c) 1993-2013 by Florian Klaempfl and others
Target OS: MS-DOS 16-bit real mode
Compiling d:\cop\t\test.pas
PPU Loading C:\development\fpctrunk\units\msdos\rtl\system.ppu
PPU is compiled for another i8086 memory model
Fatal: Can't find unit system used by test

What else am I missing?




More information about the fpc-pascal mailing list