[fpc-devel]generally ask

Jonas Maebe jonas at zeus.ugent.be
Sat Dec 6 15:27:36 CET 2003


On 6 dec 2003, at 15:15, Darek Mazur wrote:

>  my ask is: do You plan correct, to achieve possibility recompile RTL  
> at
> once with other application by command line

It is certainly possible to compile the RTL without using make, since  
all make does is generate the correct command line options for the  
compiler. I suppose you mean that the compiler should be able to  
automatically compile the RTL units if they are not yet compiled? This  
is possible for all units except for the system unit, because that one  
requires a special command line option (-Us).

The others can be automatically compiled if you add the correct search  
paths to the compiler. Something like

-Fu/pp/source/rtl/win32;/pp/source/rtl/objpas;/pp/source/rtl/inc  
-Fi/pp/source/rtl/win32;/pp/source/rtl/win32/wininc;/pp/source/rtl/inc; 
/pp/source/rtl/objpas;/pp/source/rtl/inc/graph;/pp/source/rtl/i386

I may have forgotten some directories, but those should be the most  
important. You may be able to do something similar for the FCL, except  
if certain units require special command line options (for example, if  
a unit is written in objfpc mode, but it does not contain {$mode  
objfpc}, then -S2 has to be specified on the command line).

Keep in mind that this can cause very hard to find problems though: for  
example, if your ppc386.cfg configuration file contains -S2, then the  
RTL units will be compiled in objfpc mode, while they were written for  
normal FPC mode and as such they may not work with -S2 (because e.g.  
string = ansistring instead of shortstring int hat mode)


Jonas





More information about the fpc-devel mailing list