]>
Commit | Line | Data |
---|---|---|
1 | Index: pym/portage.py | |
2 | =================================================================== | |
3 | --- pym/portage.py (revision 3337) | |
4 | +++ pym/portage.py (working copy) | |
5 | @@ -1310,6 +1310,23 @@ class config: | |
6 | if "usersandbox" in self.features: | |
7 | self.features.remove("usersandbox") | |
8 | ||
9 | + if "debug-build" in self.features: | |
10 | + # the profile should be setting these, but just in case ... | |
11 | + if not len(self["DEBUG_CFLAGS"]): | |
12 | + self["DEBUG_CFLAGS"] = "-g -O" | |
13 | + self.backup_changes("DEBUG_CFLAGS") | |
14 | + if not len(self["DEBUG_CXXFLAGS"]): | |
15 | + self["DEBUG_CXXFLAGS"] = self["DEBUG_CFLAGS"] | |
16 | + self.backup_changes("DEBUG_CXXFLAGS") | |
17 | + # replace user vars with debug version | |
18 | + for var in ["CFLAGS","CXXFLAGS","LDFLAGS"]: | |
19 | + self[var]=self["DEBUG_"+var] | |
20 | + self.backup_changes(var) | |
21 | + # if user has splitdebug, the debug info will be auto saved for | |
22 | + # gdb, otherwise we want to keep the binaries from being stripped | |
23 | + if not "splitdebug" in self.features: | |
24 | + self.features.append("nostrip") | |
25 | + | |
26 | self.features.sort() | |
27 | self["FEATURES"] = " ".join(self.features) | |
28 | self.backup_changes("FEATURES") |