From owner-freebsd-questions@FreeBSD.ORG Fri May 14 18:29:22 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 EE74B16A4CE for ; Fri, 14 May 2004 18:29:22 -0700 (PDT) Received: from out012.verizon.net (out012pub.verizon.net [206.46.170.137]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2BF8043D1F for ; Fri, 14 May 2004 18:29:22 -0700 (PDT) (envelope-from cswiger@mac.com) Received: from mac.com ([68.161.84.3]) by out012.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20040515012921.NYDR18295.out012.verizon.net@mac.com>; Fri, 14 May 2004 20:29:21 -0500 Message-ID: <40A572E0.9050802@mac.com> Date: Fri, 14 May 2004 21:31:12 -0400 From: Chuck Swiger Organization: The Courts of Chaos User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040421 X-Accept-Language: en-us, en MIME-Version: 1.0 To: platanthera References: <200405132329.07892.platanthera@web.de> <20040513220325.GC2334@gothmog.gr> <200405150303.31682.platanthera@web.de> In-Reply-To: <200405150303.31682.platanthera@web.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH at out012.verizon.net from [68.161.84.3] at Fri, 14 May 2004 20:29:21 -0500 cc: freebsd-questions@freebsd.org 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:29:23 -0000 platanthera wrote: > On Friday 14 May 2004 00:03, Giorgos Keramidas wrote: [ ... ] >> 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. > ... The manpage is correct. /etc/make.conf behaves much the same way as /etc/rc.conf and other config files with regard to default values. Take a look in /etc/defaults/make.conf, /etc/defaults/rc.conf, etc. [ ... ] > 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, .... Your understanding is not correct, although it's not clear what we should change to help resolve the confusion. CFLAGS has a default value which will be used for everything you compile (meaning ports, the base system, and other things as well [1]) unless you specify something else. > otherwise the settings specified in the respective Makefile would be used. No, the various Makefiles throughout the system *don't* set CFLAGS for themselves, they inherit it. The reason this happens is so that you, the user, can specify CFLAGS once, in a well-documented location, and actually have your settings respected by the various software you might compile. > I had explicitly specified COPTFLAGS (-O -pipe) but not CFLAGS and saw > -O overriding -O2 when compiling a port... Please tell us which port was listing the -O2? Ports which disregard CFLAGS are considered BROKEN and ought to be fixed... -- -Chuck [1]: Observe what happens if one does "touch foo.c ; make foo.o"...