From owner-freebsd-stable Sun Mar 11 12:40:30 2001 Delivered-To: freebsd-stable@freebsd.org Received: from scully.zoominternet.net (scully.zoominternet.net [63.67.120.3]) by hub.freebsd.org (Postfix) with SMTP id 640D437B719 for ; Sun, 11 Mar 2001 12:40:22 -0800 (PST) (envelope-from dmmiller@cvzoom.net) Received: (qmail 11369 invoked from network); 11 Mar 2001 20:34:25 -0000 Received: from acs-24-154-53-165.zoominternet.net (HELO cvzoom.net) (24.154.53.165) by scully.zoominternet.net with SMTP; 11 Mar 2001 20:34:25 -0000 Message-ID: <3AABE2B5.D808C4E0@cvzoom.net> Date: Sun, 11 Mar 2001 15:40:21 -0500 From: Donn Miller X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Roman Shterenzon Cc: Matt Dillon , "freebsd-stable@FreeBSD.ORG" Subject: Re: ARCH flag in new make.conf References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Roman Shterenzon wrote: > > Just wanted to say that for RELENG_3 with gcc 2.7.2.3 or whatever it was, > -O2 worked just fine for me (both kernel and userland, I stopped building > userland with -O2 since 3.3 because it took much more time to build world). > Also, linux that used the same gcc always built kernel with -O2. > So, I believe that 2.95.2 is the one that having the problems. I think that in the case of the FreeBSD kernel or userland, anything about -O will not help much at all. The userland code is pretty much optimized and streamlined as much as possible, i.e., register variables are spec'd whenever possible. -O2 helps significantly whenever you have a lot of very large loops, and I'm not so sure the world+kernel source code has lots of very large and numerous for and while loops. Plus, it prolongs the buildworld time. -O3 just inlines functions wheverever possible, bloating things. Also, I've noticed subtle problems with gcc and tools when I've built world with anything higher than -O. For example, when gcc is built with -O2 or -Os, I've noticed that it starts acting a little quirky, e.g., eating up large amounts of memory. Building world with -O fixes this. XFree86 4-current has problems with pthreads whenever you build the code with -O3, i.e., I get "undefined reference to [some pthread function]". Dropping back to -O2 fixes this. BTW, XFree86 4-current supports threading on FreeBSD now by default, right "out of the box". It's about time! Thank you, thank you, whomever committed those changes. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message