Re: Bug#43787: PROPOSAL] changing policy on compiling with -g .. a better way
Ben Collins <bcollins@debian.org> writes:
> I wondered if anyone else has an opionion on which of these to choose.
> Either one works for me, but I think the first one is probably needed
> since some builds just can't be changed sensibly.
It worries me that we're going to become *very* dependent on a
specific version of make all of a sudden. I've tried fairly hard to
keep GNUisms out of my rules files (though I won't swear that I've
succeeded entirely).
A simpler (though less comprehensive) solution would be to allow some
way to pass the -g flag explicitly, through standardized variables.
Something like:
CC_DEBUG=-g dpkg-buildpackage
There are limitations to this approach; I mention it merely for
completeness' sake. Otherwise, I prefer the first of Manoj's
suggestions. It seems simpler, and I'm a big believer in simplicity.
And Ben's point seems like a good one too.
[excerpt from the first proposal]
> + Alternately, you could use an environment variable
> + DEB_BUILD_OPTIONS, which, if it contains `debug', would cause
> + compilation to be done with -g. (Remember not to call
> + ``install -s'' or strip on the binaries afterwards for this
> + case). The resulting binaries in your built package will then
> + contain the full set of debugging symbols (remember not to call
> + ``install -s'' or ``strip'' on the binaries afterwards).
Peanut gallery comment: I don't think we need to mention the stuff
about "remember not to call..." twice. :-)
cheers
--
Chris Waters xtifr@dsp.net | I have a truly elegant proof of the
or xtifr@debian.org | above, but it is too long to fit into
http://www.dsp.net/xtifr | this .signature file.
Reply to: