From owner-freebsd-questions Thu Dec 5 5:11:39 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 343ED37B401 for ; Thu, 5 Dec 2002 05:11:38 -0800 (PST) Received: from HAL9000.homeunix.com (12-232-220-15.client.attbi.com [12.232.220.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id 490FF43EBE for ; Thu, 5 Dec 2002 05:11:32 -0800 (PST) (envelope-from dschultz@uclink.Berkeley.EDU) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.6/8.12.5) with ESMTP id gB5DBUJt012393; Thu, 5 Dec 2002 05:11:30 -0800 (PST) (envelope-from dschultz@uclink.Berkeley.EDU) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.6/8.12.5/Submit) id gB5DBUGj012392; Thu, 5 Dec 2002 05:11:30 -0800 (PST) (envelope-from dschultz@uclink.Berkeley.EDU) Date: Thu, 5 Dec 2002 05:11:30 -0800 From: David Schultz To: Evren Yurtesen Cc: freebsd-questions@FreeBSD.ORG Subject: Re: -O3 optimization? Message-ID: <20021205131130.GB11161@HAL9000.homeunix.com> Mail-Followup-To: Evren Yurtesen , freebsd-questions@FreeBSD.ORG References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Thus spake Evren Yurtesen : > I wonder if a source is compiled with -O3 without any problems, might > there be any problems in binaries which might create crashes? You're welcome to try it out, but it isn't supported. GCC has a few obscure misfeatures at -O3. Some applications break at -O3, usually because they violate C's aliasing rules or contain broken inline assembly. At one point, the kernel's TCP checksum code had some difficult-to-solve problems with -O3, and I'm not sure whether that has been fixed. Despite all of that, I built world and kernel with -O2 a while ago and noticed no problems whatsoever. Just note that you've been warned, and you probably won't see a significant performance improvement anyway. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message