All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] package.bbclass: introduce KEEP_GNU_DEBUGLINK
@ 2009-07-17 11:20 Roman I Khimov
  2009-07-17 12:22 ` Andrea Adami
  2009-07-17 14:58 ` Khem Raj
  0 siblings, 2 replies; 5+ messages in thread
From: Roman I Khimov @ 2009-07-17 11:20 UTC (permalink / raw)
  To: openembedded-devel

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.
---
 classes/package.bbclass |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/classes/package.bbclass b/classes/package.bbclass
index f6bd7c5..5425789 100644
--- a/classes/package.bbclass
+++ b/classes/package.bbclass
@@ -192,7 +192,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)
-- 
1.6.3.3




^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-07-17 19:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-17 11:20 [PATCH] package.bbclass: introduce KEEP_GNU_DEBUGLINK Roman I Khimov
2009-07-17 12:22 ` Andrea Adami
2009-07-17 14:58 ` Khem Raj
2009-07-17 17:50   ` Roman I Khimov
2009-07-17 18:49     ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.