[prev in list] [next in list] [prev in thread] [next in thread]
List: gentoo-dev
Subject: Re: "Environement categories" (was Re: [gentoo-dev] fix binary debug support, part elevenity billion
From: Mike Frysinger <vapier () gentoo ! org>
Date: 2006-01-29 14:40:12
Message-ID: 200601290940.12249.vapier () gentoo ! org
[Download RAW message or body]
On Wednesday 25 January 2006 02:26, Brian Harring wrote:
> On Tue, Jan 24, 2006 at 08:06:12PM -0500, Mike Frysinger wrote:
> > i would be ok with implementing the back end (i.e. FEATURES=debug-build)
> > but putting off the front end (i.e. emerge --debug-build)
>
> Front-end doesn't matter, it's the back-end that's the concern. Clean
> up the backend in stable, and it's fine- hence the "shelve it"; fix
> the backend instead of tagging it half way in.
what exactly is "half way" about the attached patch ?
-mike
["portage-debug-build-backend.patch" (text/x-diff)]
Index: pym/portage.py
===================================================================
--- pym/portage.py (revision 2604)
+++ pym/portage.py (working copy)
@@ -1263,6 +1263,23 @@
if "usersandbox" in self.features:
self.features.remove("usersandbox")
+ if "debug-build" in self.features:
+ # the profile should be setting these, but just in case ...
+ if not len(self["DEBUG_CFLAGS"]):
+ self["DEBUG_CFLAGS"] = "-g -O"
+ self.backup_changes("DEBUG_CFLAGS")
+ if not len(self["DEBUG_CXXFLAGS"]):
+ self["DEBUG_CXXFLAGS"] = self["DEBUG_CFLAGS"]
+ self.backup_changes("DEBUG_CXXFLAGS")
+ # replace user vars with debug version
+ for var in ["CFLAGS","CXXFLAGS","LDFLAGS"]:
+ self[var]=self["DEBUG_"+var]
+ self.backup_changes(var)
+ # if user has splitdebug, the debug info will be auto saved for
+ # gdb, otherwise we want to keep the binaries from being stripped
+ if not "splitdebug" in self.features:
+ self.features.append("nostrip")
+
self.features.sort()
self["FEATURES"] = " ".join(["-*"]+self.features)
self.backup_changes("FEATURES")
Index: pym/portage_const.py
===================================================================
--- pym/portage_const.py (revision 2604)
+++ pym/portage_const.py (working copy)
@@ -40,7 +40,7 @@
CONFIG_MEMORY_FILE = PRIVATE_PATH + "/config"
INCREMENTALS=["USE","USE_EXPAND","USE_EXPAND_HIDDEN","FEATURES","ACCEPT_KEYWORDS","AC \
CEPT_LICENSE","CONFIG_PROTECT_MASK","CONFIG_PROTECT","PRELINK_PATH","PRELINK_PATH_MASK"]
-STICKIES=["KEYWORDS_ACCEPT","USE","CFLAGS","CXXFLAGS","MAKEOPTS","EXTRA_ECONF","EXTRA_EINSTALL","EXTRA_EMAKE"]
+STICKIES=["KEYWORDS_ACCEPT","USE","CFLAGS","CXXFLAGS","LDFLAGS","DEBUG_CFLAGS","DEBU \
G_CXXFLAGS","DEBUG_LDFLAGS","MAKEOPTS","EXTRA_ECONF","EXTRA_EINSTALL","EXTRA_EMAKE"] \
EBUILD_PHASES = ["setup","unpack","compile","test","install","preinst","postinst","prerm","postrm"]
EAPI = 0
--
gentoo-dev@gentoo.org mailing list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic