From owner-freebsd-questions@FreeBSD.ORG Mon Nov 14 20:23:02 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 22DD216A41F for ; Mon, 14 Nov 2005 20:23:02 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8CF4043D6D for ; Mon, 14 Nov 2005 20:23:01 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 70B271A3C2A for ; Mon, 14 Nov 2005 12:23:01 -0800 (PST) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id C4A905126B; Mon, 14 Nov 2005 15:23:00 -0500 (EST) Date: Mon, 14 Nov 2005 15:23:00 -0500 From: Kris Kennaway To: freebsd-questions@freebsd.org Message-ID: <20051114202300.GB98749@xor.obsecurity.org> References: <20051114102308.7515.GERARD@seibercom.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/NkBOFFp2J2Af1nK" Content-Disposition: inline In-Reply-To: <20051114102308.7515.GERARD@seibercom.net> User-Agent: Mutt/1.4.2.1i Subject: Re: Makefile and Kernel Optimizations in 6.0 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Nov 2005 20:23:02 -0000 --/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--