Date: Wed, 5 Aug 2009 15:36:48 +0200 From: Roland Smith <rsmith@xs4all.nl> To: David Southwell <david@vizion2000.net> Cc: Scott Bennett <bennett@cs.niu.edu>, freebsd-questions@freebsd.org Subject: Re: Learning about Control of Optimization -- for dummies please Message-ID: <20090805133648.GB30790@slackbox.xs4all.nl> In-Reply-To: <200908051402.06130.david@vizion2000.net> References: <200908051238.n75CcKC1006683@mp.cs.niu.edu> <200908051402.06130.david@vizion2000.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <chuckles> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090805133648.GB30790>