Date: Thu, 6 Sep 2012 17:10:57 +1000 From: Peter Jeremy <peter@rulingia.com> To: freebsd-ports@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: Building with WITH_DEBUG (-g) in make.conf Message-ID: <20120906071057.GF2654@aspire.rulingia.com> In-Reply-To: <504677AB.8040908@FreeBSD.org> References: <53c5133d8fac4f4353eda0add82e2234@viper-webmail.viper.enta.net> <CAF6rxgncRbkdKHniV5qRSxxt2OR35LomeyJObugRkBeAYMBV6A@mail.gmail.com> <504677AB.8040908@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <dim@freebsd.org> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120906071057.GF2654>