From owner-freebsd-questions@FreeBSD.ORG Wed Aug 5 13:36:57 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 B06FA10656E1 for ; Wed, 5 Aug 2009 13:36:57 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr16.xs4all.nl (smtp-vbr16.xs4all.nl [194.109.24.36]) by mx1.freebsd.org (Postfix) with ESMTP id 5D65F8FC08 for ; Wed, 5 Aug 2009 13:36:57 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr16.xs4all.nl (8.13.8/8.13.8) with ESMTP id n75Damg5039638; Wed, 5 Aug 2009 15:36:49 +0200 (CEST) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id 618ABB85D; Wed, 5 Aug 2009 15:36:48 +0200 (CEST) Date: Wed, 5 Aug 2009 15:36:48 +0200 From: Roland Smith To: David Southwell Message-ID: <20090805133648.GB30790@slackbox.xs4all.nl> References: <200908051238.n75CcKC1006683@mp.cs.niu.edu> <200908051402.06130.david@vizion2000.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wzJLGUyc3ArbnUjN" Content-Disposition: inline In-Reply-To: <200908051402.06130.david@vizion2000.net> X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: by XS4ALL Virus Scanner 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:36:58 -0000 --wzJLGUyc3ArbnUjN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 u= se > > >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 litt= le=20 > more because I do not understand the implications. >=20 > should I have: > CPUTYPE=3Dnocona=20 > 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=3DFOO You should then put your kernel config in /usr/src/sys/amd64/conf/FOO. > So far my draft make.conf has these entries: >=20 > CPUTYPE=3Dnocona OK. > CFLAGS=3D -O2 -fno-strict-aliasing -pipe CFLAGS are used for building userland programs. COPTFLAGS are used for buil= ding the kernel. I think that the values you've listed here are already the default, so they are superfluous really. > FORCE_MAKE_JOBS=3D true This is only for ports. > Incidentally I am also puzzled because it appears necessary to use amd64= =20 > GENERIC as my starting point when the cpu is actually Intel Quad Core!!= =20 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; >=20 > 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 na= ming=20 > conventions!!! It would really help those of us who know little and make = it a=20 > 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 --=20 R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) --wzJLGUyc3ArbnUjN Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iEYEARECAAYFAkp5ivAACgkQEnfvsMMhpyXUZwCfSqSL+QaDJ6uxW08tXIzz7Ubu vv8AoIZ0GDdD/5eSSOu1sO/+3HCauPvH =U9u/ -----END PGP SIGNATURE----- --wzJLGUyc3ArbnUjN--