aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoman Khimov <khimov@altell.ru>2009-07-17 01:20:12 +0000
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-01-28 14:20:06 +0100
commit2b26713bdc46597200e73327de01a77446d6c758 (patch)
tree364b898158010dc4d37533ed5a258d2b76ed25d3
parent2d211aad4c60b66b1f48cb434e0e6c9276805243 (diff)
downloadopenembedded-2b26713bdc46597200e73327de01a77446d6c758.tar.gz
package.bbclass: introduce KEEP_GNU_DEBUGLINK
Currently we're keeping .gnu_debuglink section in files after stripping them. It makes binaries from successive builds a bit different, which is not good in situations where you want them to be exactly the same (identical checksums). So, introducing KEEP_GNU_DEBUGLINK which can be set to zero to disable this behavior and get identical result on successive builds for most of the packages.
-rw-r--r--classes/package.bbclass4
1 files changed, 3 insertions, 1 deletions
diff --git a/classes/package.bbclass b/classes/package.bbclass
index 062f782129..831ef6316f 100644
--- a/classes/package.bbclass
+++ b/classes/package.bbclass
@@ -197,7 +197,9 @@ def runstrip(file, d):
os.system("%s'%s' --only-keep-debug '%s' '%s'" % (pathprefix, objcopy, file, debugfile))
ret = os.system("%s%s" % (pathprefix, stripcmd))
- os.system("%s'%s' --add-gnu-debuglink='%s' '%s'" % (pathprefix, objcopy, debugfile, file))
+ debuglink = bb.data.getVar('KEEP_GNU_DEBUGLINK', d, 1) or '1'
+ if debuglink != '0':
+ os.system("%s'%s' --add-gnu-debuglink='%s' '%s'" % (pathprefix, objcopy, debugfile, file))
if newmode:
os.chmod(file, origmode)