On Tue, 2009-12-22 at 10:14 -0800, Ralph Giles wrote:
> I'm curious how this will affect packagers, and in particular the
> debuginfo packages fedora provides. I couldn't find much documentation
> on that, but I gather the recommended practice to to hack -g into the
> release build flags, and then rpmbuild produces both a stripped
> executable and a debuginfo package. Does this also work on libraries?
> Will however you're hacking in the -g flag maintain the NDEBUG define?
Yes, it also works on libraries. The way it works is to add some
standard options into CFLAGS and CXXFLAGS for the entire distribution to
have it consistent, and -g is one of those options. Once the ELF
objects are built and ready to package, the sections containing the bits
gdb needs are split out into separate files and packaged separately.
So as long as ghostscript will still support user-defined CFLAGS, and
define NDEBUG when appropriate, it will all continue to work correctly
when you add in assert calls.