[fpc-pascal] Rebuilding RTL

Sven Barth pascaldragon at googlemail.com
Wed Aug 8 07:34:51 CEST 2018


Am 08.08.2018 um 00:42 schrieb Ryan Joseph:
>
>> On Aug 7, 2018, at 4:17 PM, Sven Barth via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
>>
>> Are you sure that you used the correct compiler? Try to pass -n to tell it to ignore the fpc.cfg and see whether it picks up the correct ones when you pass them with - Fu (-Fo is not required). You can also use -vut to see which locations the compiler tries to find units in and which it uses in the end.
> Maybe I’m doing this all wrong. I’m building with the compiler using lazbuild /fpc/compiler/pp.lpi then using the compiler at /fpc/compiler/i386/pp.
>
> Does that make any difference to your instructions?

The main difference is that the compiler will not be build using the new RTL. This is in most cases no problem at least if you don't want to use new features that you added to the RTL *inside* the compiler.

I do that myself as well when testing bugs or developing new features (though I don't use Lazbuild, but build inside the IDE, but that shouldn't make a difference). I then build the RTL like this:

make clean all FPC=/path/to/src/compiler/<cpu>/pp

And then I can use the new RTL like this (assuming my current directory is the trunk checkout):

./compiler/<cpu>/pp -n -Furtl/units/<cpu>-<os> [other options] mytest.pp

Please keep in mind that probably you can't use units outside of the RTL directory in that case (due to different checksums), for that you'd need to do a "make clean all" inside the top level directory which will also rebuild the compiler, the RTL and all packages. Also you *must not* use "fpc" as that will use your installed compiler, but you must use the one you compiled directly.

Regards,
Sven




More information about the fpc-pascal mailing list