[fpc-devel] building fpc / fpmake and multicore cpu ?

Graeme Geldenhuys graemeg.lists at gmail.com
Mon Oct 3 12:26:04 CEST 2011


On 01/10/2011 12:56, Mattias Gaertner wrote:
>>
>> Is that correct? Does the old Makefile driven compilation use both/all 
>> cores, while packages done via fpmake, are using one core only?
> 
> AFAIK the makefile does not use parallel compilation.

Yes it does, at least for compiling FPC itself (or rather parts thereof
- but which parts I don't know, probably the FCL).

eg:
   make -j 5 all

Then when looking at the CPU monitor from Gnome, I see heavy CPU load on
one core only. After some initial compilation on one core, it will
switch to using all 4 cores in my system. This shaves about 30 seconds
off the time for a clean compile of FPC on my system (if I remember
correctly).

I think it was Michael van Canneyt who told me about this switch a while
back, and that it indeed works with FPC too.  How you apply this to your
own work / projects, I have no idea.


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/




More information about the fpc-devel mailing list