Makefile and Kernel Optimizations in 6.0

Roland Smith rsmith at xs4all.nl
Mon Nov 14 17:07:59 GMT 2005


On Mon, Nov 14, 2005 at 10:23:22AM -0500, Gerard Seibert wrote:
> I have read on this forum that the /etc/make.conf file has been moved in
> version 6.0. I assume that although it has been moved, that it still
> serves the same purpose as it did in the 5.4 version. Is that correct?

It hasn't been moved. It's still /etc/make.conf. The names of some
variables have changed from NOFOO to NO_FOO.

> I also read somewhere that version 6 has CFLAGS=O2 set by default. Does
> it also have COPTFLAGS=-O2 set or does it make any difference?

I didn't notice the difference on a 2.4 GHz amd64.
> 
> Makeoptions	COPTFLAGS="O2 - pipe" Actually it goes on to  recommend
> '-funroll-loops' and '-ffast-math' as well. Since I do not know what
> those two are about, I never used them. In any case, is it recommended
> to use any optimization in the kernel in the new 6.0 version?

You can have it in the config file or in make.conf, both work. I don't
think that the kernel uses floating point, so -ffast-math shouldn't make
a lot of difference. The -pipe flag speeds up the compilation somewhat,
but has no effect on the generated code. The -funroll-loops replaces
loops of which the size is known by serial instructions. This is
somewhat faster but generates larger binaries.

Complete information about what an option does is available in the info
file of gcc. You can type 'info gcc' to read it, or use the info reader
built into emacs.

Unless you have an app that takes hours or days to run, I wouldn't worry
about optimization settings.

Roland
-- 
R.F.Smith (http://www.xs4all.nl/~rsmith/) Please send e-mail as plain text.
public key: http://www.xs4all.nl/~rsmith/pubkey.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20051114/7dca677e/attachment.bin


More information about the freebsd-questions mailing list