From owner-freebsd-arch@FreeBSD.ORG Fri Jun 18 10:24:45 2010 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 567A9106566B for ; Fri, 18 Jun 2010 10:24:45 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id E7C1B8FC12 for ; Fri, 18 Jun 2010 10:24:44 +0000 (UTC) Received: from c122-106-175-69.carlnfd1.nsw.optusnet.com.au (c122-106-175-69.carlnfd1.nsw.optusnet.com.au [122.106.175.69]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o5IAOZQw018237 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 18 Jun 2010 20:24:37 +1000 Date: Fri, 18 Jun 2010 20:24:35 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: "M. Warner Losh" In-Reply-To: <20100617.143334.584432776655157077.imp@bsdimp.com> Message-ID: <20100618201737.T41916@delplex.bde.org> References: <20100617.143334.584432776655157077.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: arch@FreeBSD.org Subject: Re: Time to stop stripping binaries? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jun 2010 10:24:45 -0000 On Thu, 17 Jun 2010, M. Warner Losh wrote: > Now that disks are big, can we stop stripping binaries by default? Symbols aren't very useful unless they are full debugging symbols, but with full debugging symbols the unstripped binaries would be _very_ large. With only non-debugging symbols, the symbols' size in most shared executables is small since most symbols are in libraries. However, all libraries may need to be compiled with full symbols irrespective of the default policy for stripping installed binaries, so that you can debug [non-installed] binaries. > I've worked up a patch that lets you set WITH_BINARY_SYMBOLS or > WITHOUT_BINARY_SYMBOLS as you see fit. We should commit it regardless > of the outcome of this discussion (well, defaulting to yes or no > depending on the outcome). > Index: bsd.lib.mk > =================================================================== > --- bsd.lib.mk (revision 209268) > +++ bsd.lib.mk (working copy) > @@ -46,7 +46,7 @@ > .endif > .endif > > -.if !defined(DEBUG_FLAGS) > +.if !defined(DEBUG_FLAGS) || ${MK_BINARY_SYMBOLS} == "no" > STRIP?= -s > .endif > The case of full debugging symbols is already handled here. I believe some committers (not bde) actually use it. Similarly in bsd.prog.mk. So is the case of not stripping installed binaries (STRIP=). I don't want the bloat from building and/or installing libraries with full symbols, but miss an easy way to build them when needed (maybe on demand -- libc now takes only a few seconds to compile). If you fix this, don't forget the case of libraries in ports bloatware that takes more than a few seconds to compile :-). Bruce