From owner-svn-src-all@FreeBSD.ORG Tue Nov 25 13:49:33 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47AD168C; Tue, 25 Nov 2014 13:49:33 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 0FF5BCD7; Tue, 25 Nov 2014 13:49:31 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA23982; Tue, 25 Nov 2014 15:51:23 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1XtGUj-000Dru-Ky; Tue, 25 Nov 2014 15:49:29 +0200 Message-ID: <547488B1.80400@FreeBSD.org> Date: Tue, 25 Nov 2014 15:48:33 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Alexander Kabaev Subject: Re: svn commit: r274200 - head/share/mk References: <201411062246.sA6MkeLN018716@svn.freebsd.org> <20141108120000.3f16feab@kan> <545E7882.90209@FreeBSD.org> <20141108172440.12418020@kan> In-Reply-To: <20141108172440.12418020@kan> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Mark Johnston , src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 13:49:33 -0000 [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