From owner-freebsd-questions@FreeBSD.ORG Fri May 14 18:03:48 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 216CA16A4CE for ; Fri, 14 May 2004 18:03:48 -0700 (PDT) Received: from smtp.web.de (smtp05.web.de [217.72.192.209]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6053443D31 for ; Fri, 14 May 2004 18:03:47 -0700 (PDT) (envelope-from platanthera@web.de) Received: from [217.235.57.209] (helo=liza.hacienda.herti) by smtp.web.de with asmtp (TLSv1:RC4-MD5:128) (WEB.DE 4.101 #91) id 1BOnab-0005my-00 for freebsd-questions@freebsd.org; Sat, 15 May 2004 03:03:46 +0200 From: platanthera To: freebsd-questions@freebsd.org Date: Sat, 15 May 2004 03:03:31 +0200 User-Agent: KMail/1.6.2 References: <200405132329.07892.platanthera@web.de> <20040513220325.GC2334@gothmog.gr> In-Reply-To: <20040513220325.GC2334@gothmog.gr> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200405150303.31682.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: Sat, 15 May 2004 01:03:48 -0000 On Friday 14 May 2004 00:03, Giorgos Keramidas wrote: > On 2004-05-13 23:29, 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. > > Or do I misunderstand something? > > Yes, you do. But I'm sure that you will find the make.conf(5) > manpage very informative and useful. not really. it says ... The /etc/make.conf file is included from the appropriate Makefile which specifies the default settings for all the available options. Options need only be specified in /etc/make.conf when the system administrator wishes to override these defaults. ... and in (/usr/share/examples)/etc/make.conf you can find .. # CFLAGS controls the compiler settings used when compiling C code ... #CFLAGS= -O -pipe ... # To compile just the kernel with special optimizations, you should use # this instead of CFLAGS (which is not applicable to kernel builds anyway). ... #COPTFLAGS= -O -pipe ... to my understanding this explains what CFLAGS/COPTFLAGS are intended for and _implies_ you'd have to uncomment the flag definitions in /etc/make.conf to set them active, otherwise the settings specified in the respective Makefile would be used. I had explicitly specified COPTFLAGS (-O -pipe) but not CFLAGS and saw -O overriding -O2 when compiling a port... quite confusing that uncommenting the example settings in make.conf changes exactly nothing, since these are the (undocumented?) system defaults anyway. probably a doc issue? - or just my stupidity .-)