Date: Tue, 25 Nov 2014 15:48:33 +0200 From: Andriy Gapon <avg@FreeBSD.org> To: Alexander Kabaev <kabaev@gmail.com> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Mark Johnston <markj@FreeBSD.org>, src-committers@FreeBSD.org Subject: Re: svn commit: r274200 - head/share/mk Message-ID: <547488B1.80400@FreeBSD.org> In-Reply-To: <20141108172440.12418020@kan> References: <201411062246.sA6MkeLN018716@svn.freebsd.org> <20141108120000.3f16feab@kan> <545E7882.90209@FreeBSD.org> <20141108172440.12418020@kan>
next in thread | previous in thread | raw e-mail | index | archive | help
[I see that Mark reverted the change almost immediately.] On 09/11/2014 00:24, Alexander Kabaev wrote: > Because when building stuff with unwanted debug symbols one should make > sure they are really gone and the patch basically undoes than promise. > Whose job is it to strip .o's that end up in as the part of the .a > archives, for example? DEBUG_FLAGS are there for users to be able to > specify, khm, own debug flags and stuffing values in there > automatically is just wrong. Also, there are these bits in our .mk > files which I did not remember were there: > > .if !defined(DEBUG_FLAGS) > STRIP?= -s > .endif > > So, when present, DEBUG_FLAGS do prevent the stripping of binaries > completely, making the patch as is even more wrong that I thought > originally. Yes, I see now. You are right. So, probably we need a new make variable, e.g. CTF_DEBUG_FLAGS, where we would put C compiler flags required to produce objects suitable for generating CTF data, if requested. Then expansion of this variable should be on C compiler command line(s). And finally, CTFFLAGS should include -g option only if DEBUG_FLAGS have it. Does this sound about right? Also, I think that there is a possible interaction between build options to be kept in mind: WITH_CTF vs WITH_DEBUG_FILES. For example, the latter is careful enough to add -g specifically to SHARED_CFLAGS, but it also adds that option to CTFFLAGS as well. So, if "static" .o files are compiled with debug data because of WITH_CTF, then the debug data may be left around because of WITH_DEBUG_FILES. -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?547488B1.80400>