From owner-freebsd-current Mon Jun 19 3:40: 8 2000 Delivered-To: freebsd-current@freebsd.org Received: from fepa.mail.ozemail.net (fepa.mail.ozemail.net [203.2.192.101]) by hub.freebsd.org (Postfix) with ESMTP id B2EE037B5EA for ; Mon, 19 Jun 2000 03:39:58 -0700 (PDT) (envelope-from obituary@ozemail.com.au) Received: from carcass.au.hartware.com (slnew52p43.ozemail.com.au [203.108.150.121]) by fepa.mail.ozemail.net (8.9.0/8.6.12) with ESMTP id UAA03008; Mon, 19 Jun 2000 20:39:41 +1000 (EST) Received: (from obituary@localhost) by carcass.au.hartware.com (8.9.3/8.9.3) id UAA55314; Mon, 19 Jun 2000 20:37:05 +1000 (EST) (envelope-from obituary) Date: Mon, 19 Jun 2000 20:37:05 +1000 From: "Jacob A. Hart" To: Donn Miller Cc: current@FreeBSD.ORG Subject: Re: compiling kernel with -Os or -O2 Message-ID: <20000619203705.A55219@carcass.au.hartware.com> References: <394D5886.F736F395@cvzoom.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="YiEDa0DAkWCtVeE4" Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <394D5886.F736F395@cvzoom.net>; from dmmiller@cvzoom.net on Sun, Jun 18, 2000 at 07:17:26PM -0400 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --YiEDa0DAkWCtVeE4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable A word of advice for those who use modules: If you've recompiled the kernel with -O and the system still won't boot, be sure to set CFLAGS=3D"-O -pipe" in /etc/make.conf so that your modules are also compiled with -O. A -O kernel with -O2 modules _doesn't_ work (on my system anyway). Now that modules are built with the kernel, perhaps COPTFLAGS should be the optimisation variable responsible for both kernel _and_ modules? -jake On Sun, Jun 18, 2000 at 07:17:26PM -0400, Donn Miller wrote: > Anyone try to compile the kernel with an optimization higher than -O, > such as -Os or -O2? For example, when I compile my kernel with -Os, I > get a "fatal trap 12: page fault in supervisor mode" right after I > see this on my screen while the kernel is booting: >=20 > Copyright (c) 1992-2000 The FreeBSD Project. > Copyright (c) 1982, 1986, 1989, 1991, 1993 > The Regents of the University of California. All rights > reserved. > FreeBSD 5.0-CURRENT #0: Sun Jun 18 19:06:34 EDT 2000 > dmmiller@lc210.cvzoom.net:/usr/src/sys/compile/CUSTOM > Timecounter "i8254" frequency 1193182 Hz > CPU: Pentium/P55C (166.45-MHz 586-class CPU) > Origin =3D "GenuineIntel" Id =3D 0x543 Stepping =3D 3 > Features=3D0x8001bf > real memory =3D 62914560 (61440K bytes) >=20 >=20 > This is all the further the boot gets before the page fault. Of > course, as David O'Brien pointed out, optimization levels beyond -O > aren't supported. But, I'm curious as to what the cause of this is, > as it may reveal a deeper problem someplace. For example, is the > problem with binutils, the kernel source code, or both? Hopefully, > we'll find out after the binutils upgrade is complete. >=20 > I should point out that using -O to compile the kernel gives no > problems booting; it's just -Os that causes the problems for me. >=20 > - Donn >=20 >=20 > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message --=20 Jacob A. Hart Powered by: FreeBSD 5.0-CURRENT #25: Sat Jun 17 14:16:03 EST 2000 I believe the technical term is "Oops!" --YiEDa0DAkWCtVeE4 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 5.0i for non-commercial use MessageID: xNsGsB2efH0d7H8tVkohd1R2TbRNBjP9 iQA/AwUBOU330H1KIGEEZDODEQI+4wCfdOUnLKQWM7LXBpkG4yn6SuZ9JukAoJ+N Gf9f0ThF6PGNXj707YYgXxEa =Ry8z -----END PGP SIGNATURE----- --YiEDa0DAkWCtVeE4-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message