From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 24 13:52:23 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 0A10116A40F for ; Tue, 24 Oct 2006 13:52:23 +0000 (UTC) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (relay0.rambler.ru [81.19.66.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id F35BF43D8C for ; Tue, 24 Oct 2006 13:51:41 +0000 (GMT) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (localhost [127.0.0.1]) by relay0.rambler.ru (Postfix) with ESMTP id B65936411; Tue, 24 Oct 2006 17:51:33 +0400 (MSD) Received: from edoofus.park.rambler.ru (unknown [81.19.65.108]) by relay0.rambler.ru (Postfix) with ESMTP id DE1DB6012; Tue, 24 Oct 2006 17:48:00 +0400 (MSD) Received: (from ru@localhost) by edoofus.park.rambler.ru (8.13.8/8.13.8) id k9ODm0r7021037; Tue, 24 Oct 2006 17:48:00 +0400 (MSD) (envelope-from ru) Date: Tue, 24 Oct 2006 17:48:00 +0400 From: Ruslan Ermilov To: Jeremie Le Hen Message-ID: <20061024134800.GB20819@rambler-co.ru> References: <20061020150848.GQ53114@obiwan.tataz.chchile.org> <20061020191332.GC59856@rambler-co.ru> <20061021162635.GS53114@obiwan.tataz.chchile.org> <20061021172533.GA69551@rambler-co.ru> <20061022153436.GW53114@obiwan.tataz.chchile.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FkmkrVfFsRoUs1wW" Content-Disposition: inline In-Reply-To: <20061022153436.GW53114@obiwan.tataz.chchile.org> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: No virus found 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: Tue, 24 Oct 2006 13:52:23 -0000 --FkmkrVfFsRoUs1wW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Oct 22, 2006 at 05:34:36PM +0200, Jeremie Le Hen wrote: > Ruslan, >=20 > 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 futu= re > > > (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. >=20 > 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. >=20 > Let me show you an example. >=20 > I have an additional that is included from both bsd.sys.mk > and bsd.port.mk: >=20 > % .if ${MK_SSP} !=3D "no" > % SSP_CFLAGS ?=3D -fstack-protector > % CFLAGS +=3D ${SSP_CFLAGS} > % . if defined(WARNS) && ${WARNS} >=3D 7 && !empty(SSP_CFLAGS) > % CWARNFLAGS +=3D -Wstack-protector > % . endif > % .endif >=20 > 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: >=20 > % .if (defined(MK_SSP) && ${MK_SSP} !=3D "no") || defined(WITH_SSP) >=20 > What do you advice me to do ? >=20 I still don't understand why my patch created a problem for you. This option is not in bsd.own.mk, so it's not covered by my patch. All my patch does is "don't process /etc/src.conf" which is entirely for src/. So, you can continue to use your bsd.ssp.mk as before, and my patch shouldn't influence it. If you want to really mimic the standard behavior, then bsd.ssp.mk should check the (WITH|WITHOUT)_SSP set by a user, and set MK_SSP to "yes/no", accordingly; setting MK_SSP by a user shouldn't be allowed or supported. You then set WITH_SSP=3D in /etc/make.conf (or in /etc/src.conf if you want it only for src/), or pass -DWITH_SSP on the make command line, and you're done. P.S. There has been a patch floating around that adds support for /etc/ports.conf. That would allow for clear separation: src.conf src/ only settings; ports.conf ports/ only settings; make.conf all-time settings, including when building src/ and ports/. Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --FkmkrVfFsRoUs1wW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFPhmQqRfpzJluFF4RAryIAJ9ZCa6ocrjaKQnOfbUBxs4CyL7LtACcDQl+ ieRRCJNJ2vUZQizv+gY3V5c= =91uV -----END PGP SIGNATURE----- --FkmkrVfFsRoUs1wW--