Forum > General

RTL: little changes

(1/1)

Fibonacci:
I have my own way to do it, but maybe there is a better one.

So I want to edit the RTL. Say I want to change the actual entrypoint function, so I edit sysinitpas.pp and change one line, now how do I compile just that unit and use it in my project without rebuilding the whole RTL?

jamie:
if there was some benefit for the general public, wouldn't they have done that already?

Why don't you ask for the feature?


In any case, you need to use a boot compiler normally one version less to rebuild it.

Jamie

Leledumbo:

--- Quote from: Fibonacci on December 26, 2024, 01:06:40 am ---Say I want to change the actual entrypoint function, so I edit sysinitpas.pp and change one line, now how do I compile just that unit and use it in my project without rebuilding the whole RTL?

--- End quote ---
After compilation, move the .o and .ppu to overwrite the same files in the RTL directory. I'm not sure if there are other units depend on sysinitpas, but if there are, they will need to be rebuilt, recursively (meaning what depend on them will need to be rebuilt as well). Alternatively, specifying -Fu to the directory where the .o and .ppu reside MIGHT work (no promises, but easy to prove) as the compiler will prioritize searching on user supplied directories first.

paule32:
which platform ?

PascalDragon:

--- Quote from: Fibonacci on December 26, 2024, 01:06:40 am ---I have my own way to do it, but maybe there is a better one.

So I want to edit the RTL. Say I want to change the actual entrypoint function, so I edit sysinitpas.pp and change one line, now how do I compile just that unit and use it in my project without rebuilding the whole RTL?

--- End quote ---

The SysInitPas is only used by the program or library file, so you can just compile the unit with your changes without having to recompile anything else and move the resulting .o and .ppu file to your installation or your project (depending if you want this change only to apply to your project or all the binaries you compile).

Navigation

[0] Message Index

Go to full version