From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 6 07:11:17 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA33A106566C; Thu, 6 Sep 2012 07:11:17 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vps.rulingia.com (host-122-100-2-194.octopus.com.au [122.100.2.194]) by mx1.freebsd.org (Postfix) with ESMTP id 390E88FC0C; Thu, 6 Sep 2012 07:11:16 +0000 (UTC) Received: from aspire.rulingia.com (12.58.233.220.static.exetel.com.au [220.233.58.12]) by vps.rulingia.com (8.14.5/8.14.5) with ESMTP id q867B9vv065733 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 6 Sep 2012 17:11:13 +1000 (EST) (envelope-from peter@rulingia.com) Received: from aspire.rulingia.com (localhost [127.0.0.1]) by aspire.rulingia.com (8.14.5/8.14.5) with ESMTP id q867Axf0010989 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 6 Sep 2012 17:11:00 +1000 (EST) (envelope-from peter@aspire.rulingia.com) Received: (from peter@localhost) by aspire.rulingia.com (8.14.5/8.14.5/Submit) id q867AwgW010988; Thu, 6 Sep 2012 17:10:58 +1000 (EST) (envelope-from peter) Date: Thu, 6 Sep 2012 17:10:57 +1000 From: Peter Jeremy To: freebsd-ports@freebsd.org, freebsd-hackers@freebsd.org Message-ID: <20120906071057.GF2654@aspire.rulingia.com> References: <53c5133d8fac4f4353eda0add82e2234@viper-webmail.viper.enta.net> <504677AB.8040908@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ChQOR20MqfxkMJg9" Content-Disposition: inline In-Reply-To: <504677AB.8040908@FreeBSD.org> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Subject: Re: Building with WITH_DEBUG (-g) in make.conf X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Sep 2012 07:11:17 -0000 --ChQOR20MqfxkMJg9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2012-Sep-04 23:50:35 +0200, Dimitry Andric wrote: >There's a difference between just using '-g', which should never change >the behaviour of the program at runtime, and adding -DDEBUG or similar >flags on the command line, which may or may not enable extra code, or >even cause totally different code paths. In theory, gcc should generate identical code with and without '-g' but, last time I looked, adding '-g' causes non-trivial changes in the gcc code paths so it's quite possible that different code is emitted. >What is not different, is that both -g and other debugging options will >generally cause compiling and linking to take longer, since these stages >will have to process the additional debug information. As well as being much larger - several times larger is not uncommon. This further slows things down due to the additional I/O and reduced cache effectiveness. --=20 Peter Jeremy --ChQOR20MqfxkMJg9 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlBITIEACgkQ/opHv/APuIem0gCfaPgMoju+zb6sSSWKJR2TqFQJ yUUAnixbazneNvvFh9P+5FKo8iL5RdCp =TCTW -----END PGP SIGNATURE----- --ChQOR20MqfxkMJg9--