Subject: Re: building applications with debug information
To: Salvador Fandino <email@example.com>
From: Adrian Portelli <firstname.lastname@example.org>
Date: 12/13/2007 10:14:12
Salvador Fandino wrote:
> I have compiled and installed firefox on a NetBSD 4.0_RC5/sparc64 machine using pkgsrc. It is not very stable and I would like do run it under gdb, but the executable that gets installed doesn't have debugging information and is striped.
> So far, I have modified Makefile.common, setting "COPTS?= -O0 -g", and I can see that the compiler is using these flags, but I am not sure if this is the "right" way. And anyway, at the end, the binary is being striped so, I am not able to get a binary useful for debuging
> How can I do it?
> - Salva
Try setting INSTALL_UNSTRIPPED=YES
You can also set these in your mk.conf if you don't want to modify the
individual Makefiles but this will impact all the pkgsrc builds you do.
Some ppl have some fancy lines in their mk.conf which is basically an
if (package = firefox)
If you search through the archives I'm sure you'll find some examples.