From owner-freebsd-stable Tue May 8 16:35:22 2001 Delivered-To: freebsd-stable@freebsd.org Received: from mailf.telia.com (mailf.telia.com [194.22.194.25]) by hub.freebsd.org (Postfix) with ESMTP id 83C1F37B422 for ; Tue, 8 May 2001 16:35:18 -0700 (PDT) (envelope-from ertr1013@student.uu.se) Received: from d1o913.telia.com (d1o913.telia.com [195.252.44.241]) by mailf.telia.com (8.11.2/8.11.0) with ESMTP id f48NZDB11442 for ; Wed, 9 May 2001 01:35:13 +0200 (CEST) Received: from ertr1013.student.uu.se (h185n2fls20o913.telia.com [212.181.163.185]) by d1o913.telia.com (8.8.8/8.8.8) with SMTP id BAA08112 for ; Wed, 9 May 2001 01:35:13 +0200 (CEST) Received: (qmail 2747 invoked by uid 1001); 8 May 2001 23:35:15 -0000 Date: Wed, 9 May 2001 01:35:15 +0200 From: Erik Trulsson To: freebsd-stable@FreeBSD.ORG Subject: Re: CFLAGS Optimization Message-ID: <20010509013515.A2725@student.uu.se> Mail-Followup-To: freebsd-stable@FreeBSD.ORG References: <200105082305.QAA04771@freeway.dcfinc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from juha@saarinen.org on Wed, May 09, 2001 at 11:23:07AM +1200 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, May 09, 2001 at 11:23:07AM +1200, Juha Saarinen wrote: > :: Perhaps you'd be more comfortable if we changed the documentation to > :: remove all references to any -O switch with a number attached? > > Dunno. In my experience, any -O switch with a number attached creates > problems when compiling the kernel/userland on FreeBSD, so it seems > pointless to have those options. OTOH Jordan pointed out that there are some > instances for which the optflags can be useful. I have had both userland and kernel compiled using -O2 without noticing any problems. On the other hand I didn't notice much of a performance gain either so I decided that the extra compile time wasn't worth it. I would say that most programs work just fine when compiled with -O2/-O3 but not all and not all of the time. Although I am sure there are bugs gcc's optimization code I think that most of the time when programs work when compiled with -O but break when compiler with -O2 this is actually due to bugs in the program that only exposed when using high levels of optimization. > > I don't know why the optflags produce broken code on FreeBSD, but not with > Linux. Are you sure it doesn't produce bad code on Linux? Anyway, it might be that the bugs only trigger on certain code-sequences which occur in FreeBSD but not in Linux. (Or maybe not.) > > Aren't we sick of this thread yet? > Yes, we are. -- Erik Trulsson ertr1013@student.uu.se To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message