Subject: Re: pkg build with -g and no strip-ing
To: NetBSD-current Discussion List <current-users@NetBSD.ORG>
From: Greg A. Woods <woods@weird.com>
List: current-users
Date: 08/18/2001 20:23:43
[ On Saturday, August 18, 2001 at 13:31:31 (-0500), Frederick Bruckman wrote: ]
> Subject: Re: pkg build with -g and no strip-ing
>
> On Sat, 18 Aug 2001, john heasley wrote:
> > 
> > is there an convenient way to build a package with symbols and have it
> > installed without strip-ing, other than manipulating the makefile/configure
> > by hand?
> 
> You mean NetBSD pkgsrc packages? In a word, "no".

However in several words:  "Yes, sometimes, but it depends...."!  :-)
 
It works very well for any package that uses the CFLAGS and BSD_INSTALL*
environment variables conveniently set by pkgsrc.  (I don't have a great
example of one such package at the moment though...)

You just have to explicitly set STRIPFLAG to an empty value in
/etc/mk.conf first, and then maybe add '-g' to CFLAGS (either on the
command-line, or in /etc/mk.conf).

I think this works relatively well for packages that conform to the GNU
Coding Standards (which mandate that a user should be able to specify
CFLAGS and a few other values, which conveniently pkgsrc builds will
pass through for you).  (It does work for sysutils/logrot, for example.)
It also works for very simple packages like benchmarks/bonnie which end
up using the BSD mk stuff.

For me the biggest hurdle has always been getting '-g' passed to the
compiler.  I've been quite successfull at installing the binaries
without having them stripped.  I don't have a lot of packages installed
yet on the machine I'm building up right now (only about 150), but so
far I don't have a single stripped binary!  :-)

-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods@acm.org>     <woods@robohack.ca>
Planix, Inc. <woods@planix.com>;   Secrets of the Weird <woods@weird.com>