From owner-freebsd-ports@FreeBSD.ORG Fri Nov 15 18:09:03 2013 Return-Path: Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D98080A; Fri, 15 Nov 2013 18:09:03 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3E95C2B72; Fri, 15 Nov 2013 18:09:03 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::8979:eece:b560:1167] (unknown [IPv6:2001:7b8:3a7:0:8979:eece:b560:1167]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 470105C43; Fri, 15 Nov 2013 19:08:53 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_B0DAFCCC-99C7-4183-9517-FA7C893E276B"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) Subject: Re: WITH_DEBUG messing CFLAGS From: Dimitry Andric In-Reply-To: <52862548.2040801@FreeBSD.org> Date: Fri, 15 Nov 2013 19:08:49 +0100 Message-Id: References: <52862548.2040801@FreeBSD.org> To: Andriy Gapon X-Mailer: Apple Mail (2.1822) Cc: freebsd-ports@FreeBSD.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Nov 2013 18:09:03 -0000 --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 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 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--