HEADS UP: Ports are not ready for CFLAGS=-O2 in 6.0
Artem Ignatiev
zazubrik at mail.ru
Sun Jul 10 08:51:46 GMT 2005
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
More information about the freebsd-current
mailing list