From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 24 11:38:15 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 2F44A16A403; Tue, 24 Oct 2006 11:38:15 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from smtp5-g19.free.fr (smtp5-g19.free.fr [212.27.42.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F74343D5E; Tue, 24 Oct 2006 11:38:14 +0000 (GMT) (envelope-from flz@FreeBSD.org) Received: from smtp.xbsd.org (unknown [82.233.2.192]) by smtp5-g19.free.fr (Postfix) with ESMTP id 3D4611930D; Tue, 24 Oct 2006 13:38:13 +0200 (CEST) Received: from localhost (localhost.xbsd.org [127.0.0.1]) by smtp.xbsd.org (Postfix) with ESMTP id 44D6411A52; Tue, 24 Oct 2006 13:38:12 +0200 (CEST) Received: from smtp.xbsd.org ([127.0.0.1]) by localhost (srv1.xbsd.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 64257-06; Tue, 24 Oct 2006 13:38:07 +0200 (CEST) Received: from [193.95.134.156] (mayday.esat.net [193.95.134.156]) by smtp.xbsd.org (Postfix) with ESMTP id 8A0D11142A; Tue, 24 Oct 2006 13:38:06 +0200 (CEST) From: Florent Thoumie To: Jeremie Le Hen In-Reply-To: <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> <20061022153436.GW53114@obiwan.tataz.chchile.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-9wFMlG1ZSFBA1f41QO6H" Date: Tue, 24 Oct 2006 12:38:04 +0100 Message-Id: <1161689884.16172.9.camel@mayday.esat.net> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 FreeBSD GNOME Team Port X-Virus-Scanned: amavisd-new at xbsd.org Cc: freebsd-hackers@FreeBSD.org, Ruslan Ermilov 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 11:38:15 -0000 --=-9wFMlG1ZSFBA1f41QO6H Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Sun, 2006-10-22 at 17:34 +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 ? Duplicate it in make.conf at the moment. When prime time comes, send a patch against bsd.port.mk to set CFLAGS accordingly when WITH_SSP is set. I don't know if this will be accepted, but it certainly is better than having src.conf influence bsd.port.mk. --=20 Florent Thoumie flz@FreeBSD.org FreeBSD Committer --=-9wFMlG1ZSFBA1f41QO6H Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (FreeBSD) iD8DBQBFPfscMxEkbVFH3PQRAgxRAJ9h/TIfIMBwP7l0pUBPpIjYS71E6QCeNvHg KiDTOH8BEYyexmlrXkLywQM= =kxHG -----END PGP SIGNATURE----- --=-9wFMlG1ZSFBA1f41QO6H--