From owner-freebsd-stable Thu Mar 8 12:24:16 2001 Delivered-To: freebsd-stable@freebsd.org Received: from mail.wgate.com (mail.wgate.com [38.219.83.4]) by hub.freebsd.org (Postfix) with ESMTP id 0090137B71A for ; Thu, 8 Mar 2001 12:24:09 -0800 (PST) (envelope-from rjesup@wgate.com) Received: from jesup.eng.tvol.net ([10.32.2.26]) by mail.wgate.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id GN5Y4B4Y; Thu, 8 Mar 2001 15:24:24 -0500 Reply-To: Randell Jesup To: Matt Dillon Cc: Glen Gross , Steven Farmer , "freebsd-stable@FreeBSD.ORG" , msinz@wgate.com (Mike Sinz) Subject: Re: ARCH flag in new make.conf References: <01C0A6F1.C26E6DC0.ggross@symark.com> <200103071856.f27Iuxl71513@earth.backplane.com> From: Randell Jesup Date: 08 Mar 2001 15:24:24 -0500 In-Reply-To: Matt Dillon's message of "Wed, 7 Mar 2001 10:56:59 -0800 (PST)" Message-ID: User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Matt Dillon writes: > I think you are being entirely sensible. I used to use -O2 all the time, > but as of about a year ago it started breaking things (starting with > the FreeBSD kernel). Then I started using -Os because I like the code > compaction it produced, but that started breaking the kernel too. Now I > just use -O (and -O had damn well better continue to work because my > static inlines will not compile properly without it!). Two possibilities (of course): 1) gcc2.95.2 (which you're using I assume) has some bugs at -O2 (or -Os) level which are breaking on some kernel code; or 2) some code in the kernel is inherently unsafe because of lack of 'volatile' statements or other locking/synchronization issues. (ok, 3: both of the above) > Now I just don't care any more, except for the 0.1% of my personal code > that I need to optimize, and most of that I optimize simply by playing > around with the C a little or changing an algorithm out or something like > that. I care; I'm sure others do. We use -O2 (and even -O3) in production code. The fact that -O2 breaks the kernel waves big, red, scary flags. Whether it's the kernel or gcc, it needs to be fixed. The kernel isn't the only code that uses gcc or -O2, and if the kernel has bugs in it I want to track them down. The fact that it started breaking a year ago implies either a new gcc was added (I don't think so around then, but I wasn't paying attention), some bugs were checked into the kernel (possible), or some code was checked in that was correct but broke the compiler. If we knew when the breakage happened it's far easier to track down.... At this rate, pretty soon we'll be requiring -g to compile the kernel... ;-) -- Randell Jesup, Worldgate Communications, ex-Scala, ex-Amiga OS team ('88-94) rjesup@wgate.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message