Date: Wed, 16 Jul 2008 18:06:34 -0700 From: Xin LI <delphij@delphij.net> To: xorquewasp@googlemail.com Cc: freebsd-hackers@freebsd.org, d@delphij.net Subject: Re: do not strip, compile with debugging symbols Message-ID: <487E9B1A.4040809@delphij.net> In-Reply-To: <20080717005548.GA51632@logik.internal.network> References: <20080716234933.GA85290@logik.internal.network> <487E9466.5010701@delphij.net> <20080717005548.GA51632@logik.internal.network>
next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 xorquewasp@googlemail.com wrote: | On 20080716 17:37:58, Xin LI wrote: |> -----BEGIN PGP SIGNED MESSAGE----- |> Hash: SHA1 |> |> xorquewasp@googlemail.com wrote: |> | Hello. |> | |> | What's the correct way to ensure that ports are built with '-g' |> | and that binaries/libraries created are not stripped? I'm assuming |> | the first one involves setting CFLAGS in /etc/make.conf (admittedly, |> | it's apparently not supported but I'm not building world with this |> | setting anyway). |> | |> | The second, I'm not so sure about. I thought I'd heard of a NO_STRIP |> | setting but if it exists, it's not documented. |> |> I think the setting is spelled as 'WITH_DEBUG=yes' which will add '-g' |> and remove stripping. However, it still depends on the ported software |> whether they will strip, most times they will obey the settings (if not |> then it's a bug that should have fixed anyway). | | Hi. | | Yes, that does seem to work. The only problem is that it also disables | any optimization flags (I was hoping to compile with -O2 -g as I don't | need to do in-depth debugging, just have decent stack traces). | | I tried setting CFLAGS to '-O2' but WITH_DEBUG seems to override this, | too. Maybe you want DEBUG_FLAGS='-O2 -pipe -fno-strict-aliasing -g'? - -- Xin LI <delphij@delphij.net> http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkh+mxoACgkQi+vbBBjt66B/fgCgrenfepYZBy4Hd5zLFCvXv7OF 6J4AnR6O9WqnIMegrp5INv1LdXavYjba =wyq3 -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?487E9B1A.4040809>