Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] fix binary debug support, part elevenity billion 1/2
Date: Thu, 19 Jan 2006 22:57:27
Message-Id: 200601191756.47460.vapier@gentoo.org
In Reply to: [gentoo-dev] fix binary debug support, part elevenity billion by Mike Frysinger
1 On Sunday 15 January 2006 01:11, Mike Frysinger wrote:
2 > this topic has come up before too many times and has yet to be solved, and
3 > we have too many hacks in place
4
5 ok, so after sitting on the list for a while and accumulating feedback, how
6 about this:
7
8 - USE=debug *never* changes CFLAGS or LDFLAGS or what have you, it *only*
9 enables additional runtime code (such as assert()'s or helpful debug
10 output) ... if you're confused by what i mean, run `USE=debug emerge nano`
11 and then run `nano`
12
13 - we add an emerge flag (say '--debug-build') which adds "debug-build" to
14 FEATURES
15
16 - if "debug-build" is in FEATURES, then the following happens:
17 * auto sets CFLAGS to DEBUG_CFLAGS, LDFLAGS to DEBUG_LDFLAGS, CXXFLAGS to
18 DEBUG_CXXFLAGS (and in the future, we can add more variables as the need
19 comes up)
20 * if user already has FEATURES=splitdebug, then do not add "nostrip"
21 * if user does not have FEATURES=splitdebug, then add "nostrip" to FEATURES
22
23 - we will set sane debug defaults in the base profile:
24 * DEBUG_CFLAGS=DEBUG_CXXFLAGS="-O -g"
25 * DEBUG_LDFLAGS=""
26 - subprofiles can tweak these values as they see fit (or as required)
27
28 i'll go ahead and start implementing framework for this in the meantime
29 -mike
30 --
31 gentoo-dev@g.o mailing list

Replies