Subject: Kernel compile 100 times faster (this sound provocating,doesnt it?:)
To: Carsten Hammer <chammer@phyd2hammer.uni-bielefeld.de>
From: David Gilbert <dgilbert@jaywon.pci.on.ca>
List: current-users
Date: 02/03/1996 17:44:42
>>>>> "Carsten" == Carsten Hammer <chammer@phyd2hammer.uni-bielefeld.de> writes:

Carsten> Hi, When compiling a currentkernel on a 030/25Mhz this can
Carsten> need many hours.  Most of the time is wasted in including the
Carsten> same files.  I imagine to speed up this by joining all
Carsten> C-Sources by a script used instead of gcc (by changing
Carsten> GCC=gcc to GCC=collectcfiles) and cating this to one
Carsten> file. After this multiple includes should be removed and the
Carsten> whole file feed to gcc.

Carsten> Are there any very important restrictions that dont allow to
Carsten> do this? Are there some "mutual exklusions"? (headerfiles or
Carsten> sources that cant be feed to the C-Compiler at the same time)
Carsten> Are there any internal limits in gcc that dont allow to do
Carsten> this?

	I don't think that you'd find it any faster.  Gcc can get
very, very large when processing a large file.  Additional swapping
would only hurt you.  Also, in any reasonably good system, the cost of
each subsequent compile (after the first) is greatly reduced by disk
buffering.

	Gcc may well handle this situation.  A better way to make your
compiles faster would probably entail keeping around the previous
compiled kernel, and reusing the built objects to recompile.

	To take this further, it would be relatively painless to
recompile the kernel if NetBSD provided what is called a 'link kit'
... but that's for someone else to figure out.

Carsten> Of course this doesnt give anything to the real developers as
Carsten> the compiletime may be reduced a lot for a complete compile
Carsten> but is most probably lots longer than to compile only one of
Carsten> the C-Sourcefiles and link the kernel again.  But maybe under
Carsten> certain circumstanzes such a thing would be useful for them
Carsten> too as this way maybe does not need a make depend.

	I think that it would also buy you less than you think.

Dave.

-- 
----------------------------------------------------------------------------
|David Gilbert, PCI, Richmond Hill, Ontario.  | Two things can only be     |
|Mail:      dgilbert@jaywon.pci.on.ca         |  equal if and only if they |
|http://www.pci.on.ca/~dgilbert               |   are precisely opposite.  |
---------------------------------------------------------GLO----------------