From owner-freebsd-questions@FreeBSD.ORG Thu May 13 17:04:14 2004 Return-Path: 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 7623016A4CE for ; Thu, 13 May 2004 17:04:14 -0700 (PDT) Received: from smtp.web.de (smtp06.web.de [217.72.192.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id C3B8F43D41 for ; Thu, 13 May 2004 17:04:13 -0700 (PDT) (envelope-from platanthera@web.de) Received: from [217.225.248.186] (helo=liza.hacienda.herti) by smtp.web.de with asmtp (TLSv1:RC4-MD5:128) (WEB.DE 4.101 #91) id 1BOQBQ-0008PV-00 for freebsd-questions@freebsd.org; Fri, 14 May 2004 02:04:12 +0200 From: platanthera To: freebsd-questions@freebsd.org Date: Fri, 14 May 2004 02:01:15 +0200 User-Agent: KMail/1.6.2 References: <200405132329.07892.platanthera@web.de> <200405140139.35007.platanthera@web.de> <20040513234135.GD22583@xor.obsecurity.org> In-Reply-To: <20040513234135.GD22583@xor.obsecurity.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200405140201.15120.platanthera@web.de> Sender: platanthera@web.de Subject: Re: COPTFLAGS (not?) only for compiling the kernel? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 May 2004 00:04:14 -0000 On Friday 14 May 2004 01:41, Kris Kennaway wrote: > On Fri, May 14, 2004 at 01:39:34AM +0200, platanthera wrote: > > On Friday 14 May 2004 01:09, Kris Kennaway wrote: > > > On Fri, May 14, 2004 at 01:12:41AM +0200, platanthera wrote: > > > > On Friday 14 May 2004 00:48, Kris Kennaway wrote: > > > > > On Thu, May 13, 2004 at 11:29:07PM +0200, platanthera wrote: > > > > > > [/etc/make.conf] > > > > > > ... > > > > > > # To compile just the kernel with special optimizations, > > > > > > you should use # this instead of CFLAGS (which is not > > > > > > applicable to kernel builds anyway). # There is very little > > > > > > to gain by using higher optimization levels, and doing # so > > > > > > can cause problems. # > > > > > > COPTFLAGS= [whatever] > > > > > > ... > > > > > > > > > > > > just the kernel... sounds like COPTFLAGS setting should not > > > > > > effect world or port builds, but apparently it does. > > > > > > > > > > It shouldn't, CFLAGS is used for that. > > > > > > > > > > Kris > > > > > > > > I'm just compiling koffice and it looks like COPTFLAGS= -O > > > > -pipe overrides the koffice defaults (no CFLAGS defined in > > > > make.conf). > > > > > > The default CFLAGS value *is* "-O -pipe". > > > > > > Kris > > > > OK, but it looks like -O overrides -O2 here, right? > > It depends which comes later in the gcc arguments. > > > And if that's true, how can I make the port build use the ports > > default instead of the system default? > > The policy of the ports collection is that all ports should use > CFLAGS instead of their own crazy defaults, which are often not > appropriate. If you want to compile your ports with -O2 -pipe > (recommended against because of compiler or system bugs it sometimes > exposes), set CFLAGS=-O2 -pipe. > > Kris Thank you very much for your help. Just one last question (slightly getting OT) - are CFLAGS settings on FreeBSD more critical than on Linux? http://www.freehackers.org/gentoo/gccflags/flag_gcc3.html recommends -O3 -pipe -fomit-frame-pointer 'for those who don't want to experiment, want a stable system, but still optimized..'