summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-06-07 13:20:42 +0000
committerMike Frysinger <vapier@gentoo.org>2006-06-07 13:20:42 +0000
commit467c57d651e0415349164ac828099d545627f823 (patch)
treec36ebad9f1be515d30b9caf4ed276a48737644e1
parent3f0e53dd05cb2a0727174d3ae0a33c439ffb23e1 (diff)
downloadportage-467c57d651e0415349164ac828099d545627f823.tar.gz
portage-467c57d651e0415349164ac828099d545627f823.tar.bz2
portage-467c57d651e0415349164ac828099d545627f823.zip
support for FEATURES=debug-build
svn path=/main/trunk/; revision=3468
-rw-r--r--pym/portage.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 79271d36a..d222e1c85 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -1336,6 +1336,23 @@ class config:
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")