From owner-freebsd-questions@FreeBSD.ORG Wed Aug 5 13:49:09 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7BB2106566B for ; Wed, 5 Aug 2009 13:49:09 +0000 (UTC) (envelope-from david@vizion2000.net) Received: from dns1.vizion2000.net (77-99-36-42.cable.ubr04.chap.blueyonder.co.uk [77.99.36.42]) by mx1.freebsd.org (Postfix) with ESMTP id 46F048FC13 for ; Wed, 5 Aug 2009 13:49:09 +0000 (UTC) (envelope-from david@vizion2000.net) Received: by dns1.vizion2000.net (Postfix, from userid 1001) id CDB4034D420; Wed, 5 Aug 2009 14:49:06 +0100 (BST) From: David Southwell Organization: Voice & Vision To: Roland Smith Date: Wed, 5 Aug 2009 14:49:06 +0100 User-Agent: KMail/1.11.4 (FreeBSD/7.2-RELEASE-p2; KDE/4.2.4; amd64; ; ) References: <200908051238.n75CcKC1006683@mp.cs.niu.edu> <200908051402.06130.david@vizion2000.net> <20090805133648.GB30790@slackbox.xs4all.nl> In-Reply-To: <20090805133648.GB30790@slackbox.xs4all.nl> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200908051449.06688.david@vizion2000.net> Cc: Scott Bennett , freebsd-questions@freebsd.org Subject: Re: Learning about Control of Optimization -- for dummies please 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: Wed, 05 Aug 2009 13:49:10 -0000 > On Wed, Aug 05, 2009 at 02:02:05PM +0100, David Southwell wrote: > > > >Additionally, compiler settings for building the kernel can be set > > > > with COPTFLAGS in /etc/make.conf. Using anything other than -O or -O2 > > > > is not guaranteed to work. If you don't know what you are doing, do > > > > not use COPTFLAGS and stick with the defaults that the build system > > > > generates. > > > > > > Right. -O3 might royally screw a kernel in particular. :-) > > > > > > > > > Scott Bennett, Comm. ASMELG, CFIAG > > > > Thanks for add more useful info however would you mind elaborating a > > little more because I do not understand the implications. > > > > should I have: > > CPUTYPE=nocona > > in make.conf? > > Yes. > > > Do I need anything else in make.conf? > > If you are building a custom kernel, you can set the name of the kernel > config there. E.g.: > > KERNCONF=FOO > > You should then put your kernel config in /usr/src/sys/amd64/conf/FOO. > > > So far my draft make.conf has these entries: > > > > CPUTYPE=nocona > > OK. > > > CFLAGS= -O2 -fno-strict-aliasing -pipe > > CFLAGS are used for building userland programs. COPTFLAGS are used for > building the kernel. I think that the values you've listed here are already > the default, so they are superfluous really. > > > FORCE_MAKE_JOBS= true > > This is only for ports. > > > Incidentally I am also puzzled because it appears necessary to use amd64 > > GENERIC as my starting point when the cpu is actually Intel Quad Core!! > > This is a FAQ. AMD originated the 64-bit extensions to the x86 > architecture while intel was chasing the itanium pipedream. This > extended architecture became known as x86_64 or amd64. After itanium > became a dud, intel started making amd64 compatible chips as well, > because the AMD chips had been hugely successfull. > > > I presume this means that in drafting a kernconf I need to refer to; > > > > dns1# pwd > > /usr/src/sys/amd64/conf > > dns1# ls -l > > total 44 > > -rw-r--r-- 1 root wheel 13 Jun 20 2005 .cvsignore > > -rw-r--r-- 1 root wheel 482 Apr 15 04:14 DEFAULTS > > Some options were moved to a DEFAULT file that is automatically included > in every kernel, so that people can't forget them. Formetting one of > those can result in an unusable kernel. > > > -rw-r--r-- 1 root wheel 11968 Apr 15 04:14 GENERIC > > -rw-r--r-- 1 root wheel 818 Apr 15 04:14 GENERIC.hints > > -rw-r--r-- 1 root wheel 1036 Apr 15 04:14 MAC > > -rw-r--r-- 1 root wheel 132 Apr 15 04:14 Makefile > > -rw-r--r-- 1 root wheel 20721 Apr 15 04:14 NOTES > > NOTES contains extra options that aren't in the GENERIC kernel. > > > It would be great if some logical consistency could be introduced into > > naming conventions!!! It would really help those of us who know little > > and make it a trifle easier to climb the greasy pole of knowledge > > > > Just look at the beginning of each file. You'll find a description of > that files purpose. > > You should base you kernel configuration on the GENERIC kernel. The > first thing you need to do is change the "ident" line to match the > filename. A kernel config FOO should include "ident FOO". Then remove > devices and options that you don't need. If you don't know what a device > or option is, leave it in. For devices, there is usually a manual > page. E.g. if you see 'device em', you can get information about it with > 'man em'. > > Look at the dmesg(8) output to see which devices you actually have. > > Roland Roland Thank you I will be digging around and try and make good use of yr advice David