From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 22 15:33:54 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BB46216A407; Sun, 22 Oct 2006 15:33:54 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp2-g19.free.fr (smtp2-g19.free.fr [212.27.42.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 48AFA43D64; Sun, 22 Oct 2006 15:33:48 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from tatooine.tataz.chchile.org (tataz.chchile.org [82.233.239.98]) by smtp2-g19.free.fr (Postfix) with ESMTP id 409AB759F8; Sun, 22 Oct 2006 17:33:48 +0200 (CEST) Received: from obiwan.tataz.chchile.org (unknown [192.168.1.25]) by tatooine.tataz.chchile.org (Postfix) with ESMTP id BBEB29E6C2; Sun, 22 Oct 2006 15:34:36 +0000 (UTC) Received: by obiwan.tataz.chchile.org (Postfix, from userid 1000) id 8FF4E405B; Sun, 22 Oct 2006 17:34:36 +0200 (CEST) Date: Sun, 22 Oct 2006 17:34:36 +0200 From: Jeremie Le Hen To: Ruslan Ermilov Message-ID: <20061022153436.GW53114@obiwan.tataz.chchile.org> References: <20061020150848.GQ53114@obiwan.tataz.chchile.org> <20061020191332.GC59856@rambler-co.ru> <20061021162635.GS53114@obiwan.tataz.chchile.org> <20061021172533.GA69551@rambler-co.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061021172533.GA69551@rambler-co.ru> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-hackers@FreeBSD.org Subject: Re: src.conf(5) seems to affect ports build X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Oct 2006 15:33:54 -0000 Ruslan, On Sat, Oct 21, 2006 at 09:25:33PM +0400, Ruslan Ermilov wrote: > > Also, your patch avoids performing the WITH(OUT)_* stuff for ports in > > order to prevent from polluting the namespace. If there is to be > > some WITH(OUT)_* knobs which leads to CFLAGS modification in the future > > (I'm thinking about ProPolice with the upcoming GCC 4.1), wouldn't it > > be worth benefiting this framework for ports ? > > It avoids only /etc/src.conf stuff when running bsd.port.mk; if you put > WITH(OUT)_* in /etc/make.conf it will still be picked up. Yes indeed, but MK_FOO won't be set and this would require to either duplicate the code that modifies CFLAGS, or at least test for MK_FOO or WITH_FOO at the same time. Let me show you an example. I have an additional that is included from both bsd.sys.mk and bsd.port.mk: % .if ${MK_SSP} != "no" % SSP_CFLAGS ?= -fstack-protector % CFLAGS += ${SSP_CFLAGS} % . if defined(WARNS) && ${WARNS} >= 7 && !empty(SSP_CFLAGS) % CWARNFLAGS += -Wstack-protector % . endif % .endif Currently it is thus quite useful to use MK_SSP when this file is included from bsd.ports.mk. With your whole patch I would have to either duplicate these bits in bsd.ports.mk or turn the condition to something like: % .if (defined(MK_SSP) && ${MK_SSP} != "no") || defined(WITH_SSP) What do you advice me to do ? Thank you for your help. Best regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org >