From owner-freebsd-ports@FreeBSD.ORG Tue Jun 1 00:47:11 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A2D216A4CE for ; Tue, 1 Jun 2004 00:47:11 -0700 (PDT) Received: from voodoo.oberon.net (voodoo.oberon.net [212.118.165.100]) by mx1.FreeBSD.org (Postfix) with ESMTP id DACBD43D31 for ; Tue, 1 Jun 2004 00:47:10 -0700 (PDT) (envelope-from krion@voodoo.oberon.net) Received: from krion by voodoo.oberon.net with local (Exim 4.34 (FreeBSD)) id 1BV3z7-000BS6-P9 for freebsd-ports@freebsd.org; Tue, 01 Jun 2004 09:46:57 +0200 Date: Tue, 1 Jun 2004 09:46:57 +0200 From: Kirill Ponomarew To: freebsd-ports Message-ID: <20040601074657.GF34332@voodoo.oberon.net> Mail-Followup-To: Kirill Ponomarew , freebsd-ports References: <20040531233106.GE85902@isis.wad.cz> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FoLtEtfbNGMjfgrs" Content-Disposition: inline In-Reply-To: <20040531233106.GE85902@isis.wad.cz> X-NCC-Regid: de.oberon X-NIC-HDL: KP869-RIPE Subject: Re: respect CFLAGS: should I override optimizations? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jun 2004 07:47:11 -0000 --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--