Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Jul 2005 18:56:22 +0200
From:      Jeremie Le Hen <jeremie@le-hen.org>
To:        Artem Ignatiev <zazubrik@mail.ru>
Cc:        freebsd-current@freebsd.org
Subject:   Re: HEADS UP: Ports are not ready for CFLAGS=-O2 in 6.0
Message-ID:  <20050710165622.GW39292@obiwan.tataz.chchile.org>
In-Reply-To: <7FCC20EB-A240-4EDC-B09A-31BEE5129676@mail.ru>
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> <7FCC20EB-A240-4EDC-B09A-31BEE5129676@mail.ru>

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

> >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

For me, the goal of PORT_CFLAGS is to bring the possibility to specify
_alternate_ CFLAGs when building port.  This means that PORT_CFLAGS
needs to be usable even if CFLAGS is specified.  Typically, make.conf(5)
would contain both variables.

> or even:
> .if defined(PORT_CFLAGS)
> CFLAGS=${PORT_CFLAGS} ${CFLAGS}
> .endif

The problem is mostly the same here.  If make.conf(5) contains :
%%%
	CFLAGS="-O2 -pipe -fomit-frame-pointer"
	PORT_CFLAGS="-O -pipe"
%%%

what you have written above would lead to have CFLAGS containing :
%%%
	-O -pipe -O2 -pipe -fomit-frame-pointer
%%%


However, I'm maybe misunderstanding what you said.  In this case,
correct me please.

Best regards,
-- 
Jeremie Le Hen
< jeremie at le-hen dot org >< ttz at chchile dot org >



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050710165622.GW39292>