Date: Fri, 15 Nov 2013 19:08:49 +0100 From: Dimitry Andric <dim@FreeBSD.org> To: Andriy Gapon <avg@freebsd.org> Cc: freebsd-ports@FreeBSD.org Subject: Re: WITH_DEBUG messing CFLAGS Message-ID: <AD4BD9DC-7521-4341-B664-FA99347E110E@FreeBSD.org> In-Reply-To: <52862548.2040801@FreeBSD.org> References: <52862548.2040801@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_B0DAFCCC-99C7-4183-9517-FA7C893E276B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 15 Nov 2013, at 14:44, Andriy Gapon <avg@freebsd.org> wrote: > I wonder what is the thinking behind CFLAGS cleansing in the following = snippet > from bsd.port.mk: >=20 > .if defined(WITH_DEBUG) && !defined(WITHOUT_DEBUG) > STRIP_CMD=3D ${TRUE} > DEBUG_FLAGS?=3D -g > CFLAGS:=3D ${CFLAGS:N-O*:N-fno-strict*} ${DEBUG_FLAGS} > .endif >=20 > If I want to control optimization level for WITH_DEBUG, then I can = always pass > -O0 or -O<whatever> in DEBUG_FLAGS. But there is no way for me to say = leave > CFLAGS alone. >=20 > Besides, the quoted logic seems to be incomplete with respect to = CXXFLAGS. > I think that the CFLAGS line should be changed simply to: >=20 > CFLAGS+=3D ${DEBUG_FLAGS} I agree, and I even had the above in my bsd.port.mk for at least a year = now. :-) -Dimitry --Apple-Mail=_B0DAFCCC-99C7-4183-9517-FA7C893E276B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iEYEARECAAYFAlKGYzsACgkQsF6jCi4glqNtLQCfRQhCdldTkIhA23awit6qZi4O HO4AoIOX3GhqWhqVDyvmD190QcF4+UBL =SJRC -----END PGP SIGNATURE----- --Apple-Mail=_B0DAFCCC-99C7-4183-9517-FA7C893E276B--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AD4BD9DC-7521-4341-B664-FA99347E110E>