A r t i c l e s
Navigation

Note: This Wiki is
outdated, personal views
may have changed.
L505 A.I. bot is dead
long live THX 1138

M a i n P a g e

D i r e c t o r y

FPC Make and Cycle Tips


Tips for making the freepascal RTL, making and cycling the compiler, using make in general, and more.
To make the RTL which is smartlinked, use OPT="-CX"
To verify you really do have smartlinked RTL, check the directory for ".a" extension files along with the ".o" ones. If no ".a" ones exist, then it isn't smartlinked.
To smartlink on top of an existing unit base, you better do a clean first:
  make clean rtl OPT="-CX"

When making a compiler using the same compiler, this is called the "make cycle".
Creating a newer compiler with an older compiler:

You do not have to cycle the compiler. You can create a new compiler from an old compiler, assuming that you aren't fixing a bug that affects the compiler you're trying to produce. The QuikPas compiler was compiled with a FreePascal compiler 2.0.0, 2.0.2, 2.0.4 while the compiler that was produced was not an FPC compiler at all.


Are you making a special custom system replacement unit?

Browse to the /rtl/linux/ directory (or your operating system), and use:

   make system OPT="-CX"
You have to browse in to the directory where system.pp is located, you cannot make the system unit like above just from the RTL directory.
Can one use a system replacement unit simutaneously with the original system unit? i.e. in the search path, if you have two system units, which one will be used?

As far as I have experimented, the first one that is used is the one in your search path. This means that you can use a system replacement unit easily: just place the system replacement unit ".o", ".ppu", and ".a" files in a search path.

You can place something such as this in your search path, the actual experimental RTL directory you just remade with "make rtl OPT="-CX":

  -Fu/home/me/FPC_2.0.2_experimental/rtl/units/
It's a good idea to make it obvious that it is experimental, in some way. i.e. if you start modifying the FPC sources and you forget you did so, this is not good. So mark the directory as experimental or similar, so you remember.
See also FreePascal Build Tips

About
Note: This Wiki is outdated, personal views may have changed.

This wiki contains info on life, health, humans, nature, programming, database, fads, paradigms, poems, principles, theories.

Articles may contain statements which some may find helpful and encouraging, or even discouraging.

Beware, I believe in the Grand Justice system.
_ _ _