From owner-freebsd-current@FreeBSD.ORG Thu Aug 12 23:07:00 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7430316A4CE; Thu, 12 Aug 2004 23:07:00 +0000 (GMT) Received: from lakermmtao09.cox.net (lakermmtao09.cox.net [68.230.240.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id B8BB443D1D; Thu, 12 Aug 2004 23:06:59 +0000 (GMT) (envelope-from conrads@cox.net) Received: from dolphin.local.net ([68.11.71.51]) by lakermmtao09.cox.net (InterMail vM.6.01.03.02.01 201-2131-111-104-103-20040709) with ESMTP id <20040812230657.ITA16139.lakermmtao09.cox.net@dolphin.local.net>; Thu, 12 Aug 2004 19:06:57 -0400 Received: from dolphin.local.net (localhost.local.net [127.0.0.1]) by dolphin.local.net (8.13.1/8.13.1) with ESMTP id i7CN6wOd010189; Thu, 12 Aug 2004 18:06:58 -0500 (CDT) (envelope-from conrads@dolphin.local.net) Received: (from conrads@localhost) by dolphin.local.net (8.13.1/8.13.1/Submit) id i7CN6rEf010188; Thu, 12 Aug 2004 18:06:53 -0500 (CDT) (envelope-from conrads) Message-ID: X-Mailer: XFMail 1.5.5 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20040812201138.GA79664@ip.net.ua> Date: Thu, 12 Aug 2004 18:06:53 -0500 (CDT) Organization: A Rag-Tag Band of Drug-Crazed Hippies From: "Conrad J. Sabatier" To: Ruslan Ermilov cc: freebsd-current@freebsd.org Subject: Re: builworld fails if debugging enabled in usr.sbin/pkg_install/lib X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: conrads@cox.net List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Aug 2004 23:07:00 -0000 On 12-Aug-2004 Ruslan Ermilov wrote: > On Thu, Aug 12, 2004 at 02:58:23PM -0500, Conrad J. Sabatier wrote: >> >> I have the following in /etc/make.conf: >> >> .if defined(DEBUG) >> CFLAGS+=-g >> .endif >> >> And then use "make -DDEBUG buildworld". >> > I suspected something like this. > src/usr.sbin/pkg_install/*/Makefile's added the contents of the > DEBUG variable to CFLAGS. By passing the -DDEBUG to make(1), you > effectively set the value of the DEBUG variable to 1 (see the make(1) > manpage), so "1" was added to CFLAGS. > > I've "fixed" these makefiles to not add DEBUG to CFLAGS. Note that > the name DEBUG is unsafe to use anyway. Also, there's an > alternative and standard way to recompile your programs and libraries > with -g: there's the DEBUG_FLAGS variable, so you could as well do it > like this: > > make buildworld DEBUG_FLAGS=-g > > Passing DEBUG_FLAGS=-g to ``make installworld'' will also cause the > binaries to *not* be stripped when installing, which is essential > for having the debugger symbols in binaries. Please consider > switching to this method of building world with debug infomation. Ah, great! I never knew about this before. Thanks! -- Conrad J. Sabatier -- "In Unix veritas"