From owner-freebsd-current@FreeBSD.ORG Sun Jul 10 08:51:46 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0804F16A41C for ; Sun, 10 Jul 2005 08:51:46 +0000 (GMT) (envelope-from zazubrik@mail.ru) Received: from mx6.mail.ru (mx6.mail.ru [194.67.23.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9988243D46 for ; Sun, 10 Jul 2005 08:51:45 +0000 (GMT) (envelope-from zazubrik@mail.ru) Received: from [83.237.204.121] (port=36815 helo=[192.168.0.8]) by mx6.mail.ru with esmtp id 1DrXXL-000NjP-00 for freebsd-current@freebsd.org; Sun, 10 Jul 2005 12:51:43 +0400 Mime-Version: 1.0 (Apple Message framework v730) In-Reply-To: <20050708215620.GN39292@obiwan.tataz.chchile.org> References: <20041102222000.GA65845@xor.obsecurity.org> <20050706073205.GA942@galgenberg.net> <20050706085737.GT73907@obiwan.tataz.chchile.org> <200507061116.17267.thierry@herbelot.com> <20050708215620.GN39292@obiwan.tataz.chchile.org> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <7FCC20EB-A240-4EDC-B09A-31BEE5129676@mail.ru> Content-Transfer-Encoding: 7bit From: Artem Ignatiev Date: Sun, 10 Jul 2005 12:51:30 +0400 To: freebsd-current@freebsd.org X-Mailer: Apple Mail (2.730) Subject: Re: HEADS UP: Ports are not ready for CFLAGS=-O2 in 6.0 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jul 2005 08:51:46 -0000 On 09.07.2005, at 1:56, Jeremie Le Hen wrote: > Hi Thierry, > > >> and it does not work if he ports tree is "physically" elsewhere >> (mine is >> shared over NFS from /files2/ports -> .CURDIR does not begin >> with /usr/ports). >> >> Perhaps a better way would be to use a variable set in bsd.ports.mk >> (BUILDING_PORT="YES") >> > > I thought a bit more about this. This seems to be a better idea than > having a PORT_CFLAGS variable, because when a user wants to compile a > port with uncommon CFLAGS, he will do the following (for instance) : > %%% > cd /usr/ports/misc/vera > make CFLAGS='-O3' install clean > %%% > > If we add something like this in ports/Mk/bsd.port.mk : > %%% > .if defined(PORT_CFLAGS) > CFLAGS=${PORT_CFLAGS} > .end > %%% > > This will obviously break POLA because setting CFLAGS won't work as > expected. Why not : .if defined(PORT_CFLAGS) && !defined(CFLAGS) CFLAGS=${PORT_CFLAGS} .endif or even: .if defined(PORT_CFLAGS) CFLAGS=${PORT_CFLAGS} ${CFLAGS} .endif