Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Jun 2004 09:46:57 +0200
From:      Kirill Ponomarew <krion@voodoo.oberon.net>
To:        freebsd-ports <freebsd-ports@freebsd.org>
Subject:   Re: respect CFLAGS: should I override optimizations?
Message-ID:  <20040601074657.GF34332@voodoo.oberon.net>
In-Reply-To: <20040531233106.GE85902@isis.wad.cz>
References:  <20040531233106.GE85902@isis.wad.cz>

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

--FoLtEtfbNGMjfgrs
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

On Tue, Jun 01, 2004 at 01:31:06AM +0200, Roman Neuhauser wrote:
> I'm updating biology/migrate, the upstream Makefile.in includes
>=20
> CFLAGS =3D @CFLAGS@ ...
>=20
> and configure says:
>=20
> case "$GCC" in
> 	yes) CFLAGS=3D"-O3 -Wall -ffast-math -funroll-loops -fomit-frame-pointer=
 -fexpensive-optimizations -D$CPUTYPE" ;;
> =20
> If I was to take Porter's Hang^Hdbook literally, I would change the
> set (=3D) to append (+=3D) and be done with it, but is that really what
> I'm expected to do? Or should I filter out the -O3 on the assumption
> that optimization levels are make.conf's business?

If you need to switch on some optimizations, you can use
WITH_OPTIMIZED_CFLAGS knob and define CFLAGS+=3D$optimized_cflags
there.

Porters Handbook expresses clearly:

"The port should respect the CFLAGS variable. What we mean by
this is that the port should not set the value of this variable
absolutely, overriding the existing value; instead, it should
append whatever values it needs to the existing value. This is
so that build options that affect all ports can be set
globally."

-Kirill

--FoLtEtfbNGMjfgrs
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFAvDRxQC1G6a60JuURAs2VAJ0TlOHi8ZqvLBxIlz4JG3b0Kt8lqgCfT1yx
uFFPdXo5mPqcKj1wDQYH7PQ=
=tiFG
-----END PGP SIGNATURE-----

--FoLtEtfbNGMjfgrs--



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