Re: [PROPOSAL] changing policy on compiling with -g .. a better way
On Wed, Sep 01, 1999 at 11:48:54AM +0200, Roman Hodek wrote:
> May I come up with a wording proposal?
>
> CC = gcc
> - CFLAGS = -O2 -g -Wall # sane warning options vary between programs
> + CFLAGS = -O2 -Wall # sane warning options vary between programs
> LDFLAGS = # none
> install -s # (or use strip on the files in debian/tmp)
> ...
>
> - The `-g' flag is useful on compilation so that you have available a
> - full set of debugging symbols in your built source tree, in case
> - anyone should file a bug report involving (for example) a core dump.
> + The `-g' flag should not be used for normal package builds, because
> + the debugging infos are stripped off the installed binaries later
> + anyway. But if an environment variable BUILD_DEBUG is set to `yes',
> + compilation should be done with -g. The resulting binaries in your
> + built source tree will then contain the full set of debugging
> + symbols, in case anyone should file a bug report involving (for
> + example) a core dump. You can also provide a target `build-debug' in
> + debian/rules which has the same effect like setting BUILD_DEBUG to
> + `yes'.
I was thinking more along the lines of "you should use -g in the default build,
unless you provide a build that honors BUILD_DEBUG=y".
This keeps us from forcing current packages to move to this, in the even that
it may be downright insane to modify the build in this way.
Ben
Reply to: