To recompile the RTL, so a new compiler can be built, at least the following
units must be built, in the order specified:
- the program stubs, that are the startup code for each pascal program. These files have
the .as extension, because they are written in assembler. They must be assembled with
the GNU as assembler. These stubs are in the OS-dependent directory, except for LINUX,
where they are in a processor dependent subdirectory of the LINUX directory (i386 or
m68k).
- the system unit. This unit is named differently on different systems:
- Only on GO32v2, it’s called system.
- For LINUX it’s called syslinux.
- For WINDOWS NT it’s called syswin32.
- For OS/2 it’s called sysos2
This unit resides in the OS-dependent subdirectories of the RTL.
- The strings unit. This unit resides in the inc subdirectory of the RTL.
- The dos unit. It resides in the OS-dependent subdirectory of the RTL. Possibly other units
will be compiled as a consequence of trying to compile this unit (e.g. on LINUX, the linux unit
will be compiled, on go32, the go32 unit will be compiled).
- the objects unit. It resides in the inc subdirectory of the RTL.
To compile these units on a i386, the following statements will do:
ppc386 -Tlinux -b- -Fi../inc -Fi../i386 -FE. -di386 -Us -Sg syslinux.pp
ppc386 -Tlinux -b- -Fi../inc -Fi../i386 -FE. -di386 ../inc/strings.pp
ppc386 -Tlinux -b- -Fi../inc -Fi../i386 -FE. -di386 dos.pp
ppc386 -Tlinux -b- -Fi../inc -Fi../i386 -FE. -di386 ../inc/objects.pp
|
These are the minimum command-line options, needed to compile the RTL.
For another processor, the i386 should be changed into the appropriate processor. For another
operating system (target) the syslinux should be changed in the appropriate system unit file, and
the target OS setting (-T) must be set accordingly.
Depending on the target OS there are other units that can be compiled, but which are
not strictly needed to recompile the compiler. The following units are available for all
plaforms:
-
objpas
- Needed for Delphi mode. Needs -S2 as an option. Resides in the objpas subdirectory.
-
sysutils
- many utility functions, like in Delphi. Resides in the objpas directory, and needs
-S2 to compile.
-
typinfo
- functions to access RTTI information, like Delphi. Resides in the objpas directory.
-
math
- math functions like in Delphi. Resides in the objpas directory.
-
mmx
- extensions for MMX class Intel processors. Resides in in the i386 directory.
-
getopts
- a GNU compatible getopts unit. resides in the inc directory.
-
heaptrc
- to debug the heap. resides in the inc directory.