From owner-freebsd-amd64@FreeBSD.ORG Tue Mar 8 16:36:01 2005 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 758) id BEC9D16A4CF; Tue, 8 Mar 2005 16:36:01 +0000 (GMT) Date: Tue, 8 Mar 2005 16:36:01 +0000 From: Kris Kennaway To: freebsd-amd64@freebsd.org Message-ID: <20050308163601.GD48072@hub.freebsd.org> References: <20050305043006.GN83265@afflictions.org> <20050308060910.GA32871@dragon.nuxi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050308060910.GA32871@dragon.nuxi.com> User-Agent: Mutt/1.4.2.1i Subject: Re: Is -O2 supported for world? X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2005 16:36:01 -0000 On Mon, Mar 07, 2005 at 10:09:10PM -0800, David O'Brien wrote: > On Fri, Mar 04, 2005 at 11:30:07PM -0500, Damian Gerow wrote: > > I'm a little fuzzy on whether -O2 is supported for world or not: I seem to > > remember on x86 it is, but the only references I've seen to amd64 were > > speaking about ports. > > > > Is -O2 optimization supported in amd64? It most definitely doesn't work: > > It is suppored w/in /usr/src. > > > /usr/src/lib/libc/i386/sys/_amd64_get_fsbase.c: In function `_amd64_get_fsbase': > > /usr/src/lib/libc/i386/sys/_amd64_get_fsbase.c:40: warning: dereferencing type-punned pointer will break strict-aliasing rules > > > > without -fno-strict-aliasing. Not that I have any serious desire to run > > with -O2, just curious. > > -O2 isn't supported in /usr/ports without -fno-strict-aliasing also. > There are a few ports that aren't happy being compiled with any form of > -O2 (such as the old perl). > No, it's worse than that. They cannot be compiled with ANY flags when *world* is built with -O2. They crash when trying to run binaries during the build, because of something going wrong in strtol() or similar (it's been ~4 months so my memory is fuzzy on the details but they've been pointed out to you several times). Kris