Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Jul 2005 12:51:30 +0400
From:      Artem Ignatiev <zazubrik@mail.ru>
To:        freebsd-current@freebsd.org
Subject:   Re: HEADS UP: Ports are not ready for CFLAGS=-O2 in 6.0
Message-ID:  <7FCC20EB-A240-4EDC-B09A-31BEE5129676@mail.ru>
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>

next in thread | previous in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7FCC20EB-A240-4EDC-B09A-31BEE5129676>