Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Nov 2005 15:23:00 -0500
From:      Kris Kennaway <kris@obsecurity.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: Makefile and Kernel Optimizations in 6.0
Message-ID:  <20051114202300.GB98749@xor.obsecurity.org>
In-Reply-To: <20051114102308.7515.GERARD@seibercom.net>
References:  <20051114102308.7515.GERARD@seibercom.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--/NkBOFFp2J2Af1nK
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Nov 14, 2005 at 10:23:22AM -0500, Gerard Seibert wrote:
> I am presently running FreeBSD 5.4, but am considering upgrading to
> version 6.0 in the near future.
>=20
> 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?
>=20
> I also read somewhere that version 6 has CFLAGS=3DO2 set by default. Does
> it also have COPTFLAGS=3D-O2 set or does it make any difference?
>=20
> Finally, I was using something I found in the BSD Hacks book distributed
> by O'Reilly. It has a section on Kernel Optimizations and recommends
> assigning  this to the kernel immediately after the i386 line.
>=20
> Makeoptions	COPTFLAGS=3D"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?

It's recommended to use the default settings, of course :)

You're unlikely to see a real difference with different compiler
optimizations, and adding weird non-standard options may even cause
problems.

Kris

P.S. -funroll-loops and -ffast-math are commonly used by people who
don't understand what they mean but like the thrill it gives them to
compile their application with secret optimizations (e.g. the word
"fast" makes them feel excited).  However, the former is often not
actually an optimization (which is why it's not on by default), and
the latter can cause incorrect computations (but I think it's
completely irrelevant in the kernel which does not do FP math).

--/NkBOFFp2J2Af1nK
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFDePIkWry0BWjoQKURAgZHAKCtrYkyt8rjv+Z5J/i5ZSdWq7mjXQCeM8xE
tuCqekfx9DRug1EatUyvvyI=
=/UeF
-----END PGP SIGNATURE-----

--/NkBOFFp2J2Af1nK--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051114202300.GB98749>