From owner-freebsd-current Sun Feb 9 8: 1:39 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CD83837B401 for ; Sun, 9 Feb 2003 08:01:37 -0800 (PST) Received: from skywalker.creative.net.au (skywalker.creative.net.au [203.56.168.1]) by mx1.FreeBSD.org (Postfix) with SMTP id 82CDE43F75 for ; Sun, 9 Feb 2003 08:01:36 -0800 (PST) (envelope-from freebsd@skywalker.creative.net.au) Received: (qmail 66532 invoked by uid 1008); 9 Feb 2003 16:01:32 -0000 Date: Mon, 10 Feb 2003 00:01:32 +0800 From: Adrian Chadd To: Terry Lambert , Ray Kohler , freebsd-current@freebsd.org Subject: Re: Compiling with high optimization? Message-ID: <20030209160132.GC33928@skywalker.creative.net.au> References: <20030208173756.GA56030@arkadia.nv.cox.net> <20030208232724.GA20435@HAL9000.homeunix.com> <3E459BF3.BB3FC381@mindspring.com> <20030209002542.GA20812@HAL9000.homeunix.com> <20030209141006.GB33928@skywalker.creative.net.au> <20030209150120.GA2263@HAL9000.homeunix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030209150120.GA2263@HAL9000.homeunix.com> User-Agent: Mutt/1.4i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Feb 09, 2003, David Schultz wrote: > > Yet squid under i386 freebsd is .. well, finds -O bugs in gcc. > > We gave up trying -O under FreeBSD a long time ago. :-) > > The last time someone told me, ``gcc -O is broken'', it turned out > that they were doing some stack fiddling, and gcc's optimizations > broke their faulty assumptions. On the other hand, I'm sure gcc -O > does have bugs. Do you have an example snippet that gets miscompiled? Err, grab the squid24 port, hack the configure script to remove the bit where it removes -O for FreeBSD, compile, install, run. It should die quite quickly after you submit a HTTP request which requires a DNS lookup - GCC generates an xor %eax, %eax at the beginning of a function which NULLs a pointer - that we're not NULLing. :-) Adrian -- Adrian Chadd learning is bad it just makes the people around you dumber (angryskul == alfred@irc) :( To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message