[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 _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"