From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 17 00:57:16 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A56A106566C for ; Thu, 17 Jul 2008 00:57:16 +0000 (UTC) (envelope-from xorquewasp@googlemail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.187]) by mx1.freebsd.org (Postfix) with ESMTP id D5ED78FC12 for ; Thu, 17 Jul 2008 00:57:15 +0000 (UTC) (envelope-from xorquewasp@googlemail.com) Received: by nf-out-0910.google.com with SMTP id h3so2241188nfh.33 for ; Wed, 16 Jul 2008 17:57:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:received:date:from:to:cc :subject:message-id:references:mime-version:content-type :content-disposition:in-reply-to; bh=e5el0neFDUbZgeQVU+HIIKQQl+66A7FxdsBf8tHW0zA=; b=fhEwYy9u+rX1NKyM2SJQajJ1BGXaPFHa6S4lC+HpdU+zyw6RqRVKThVhMWpNTtFja+ f6SbJ6JT0LlP7Wznq/87cDgXjl4WelSFTmVGoYJHCtCFa8KbRK9DphmWXKXRUriy4JKE 0GXxEHJZ44sM3HY2Ff0KZ4A7fn7Ob9vrPNjJ0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to; b=Fn/i1m0g2iKqfz2Pju6paWvUQNSe6CRo+z/X0TVfyqv5rJC7UTI+9Zhg5zOzqEjrKr INiSslX74yJ6ihZJQ+eRyTGh8QMQkRx4ElZs3oLoERdC5ouyPT7x+suGoMpTj33SqXOT DiuuNA4LLnWIsoBhbcP36nuOagYEqtfrvBEsU= Received: by 10.210.115.15 with SMTP id n15mr589846ebc.81.1216256234536; Wed, 16 Jul 2008 17:57:14 -0700 (PDT) Received: from logik.internal.network ( [81.86.41.187]) by mx.google.com with ESMTPS id q9sm7446998gve.5.2008.07.16.17.57.12 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 16 Jul 2008 17:57:13 -0700 (PDT) Received: by logik.internal.network (Postfix, from userid 11001) id C038F5F36; Thu, 17 Jul 2008 00:55:48 +0000 (UTC) Date: Thu, 17 Jul 2008 01:55:48 +0100 From: xorquewasp@googlemail.com To: d@delphij.net Message-ID: <20080717005548.GA51632@logik.internal.network> References: <20080716234933.GA85290@logik.internal.network> <487E9466.5010701@delphij.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <487E9466.5010701@delphij.net> Cc: freebsd-hackers@freebsd.org Subject: Re: do not strip, compile with debugging symbols X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jul 2008 00:57:16 -0000 On 20080716 17:37:58, Xin LI wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > xorquewasp@googlemail.com wrote: > | Hello. > | > | What's the correct way to ensure that ports are built with '-g' > | and that binaries/libraries created are not stripped? I'm assuming > | the first one involves setting CFLAGS in /etc/make.conf (admittedly, > | it's apparently not supported but I'm not building world with this > | setting anyway). > | > | The second, I'm not so sure about. I thought I'd heard of a NO_STRIP > | setting but if it exists, it's not documented. > > I think the setting is spelled as 'WITH_DEBUG=yes' which will add '-g' > and remove stripping. However, it still depends on the ported software > whether they will strip, most times they will obey the settings (if not > then it's a bug that should have fixed anyway). Hi. Yes, that does seem to work. The only problem is that it also disables any optimization flags (I was hoping to compile with -O2 -g as I don't need to do in-depth debugging, just have decent stack traces). I tried setting CFLAGS to '-O2' but WITH_DEBUG seems to override this, too. xw