[debhelper-devel] [debhelper] 06/09: dh_strip: Use strip -D unconditionally for static libs

Niels Thykier nthykier at moszumanska.debian.org
Wed Jun 15 20:29:17 UTC 2016


This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository debhelper.

commit 6b5663cc2ddfd73308653dad17874ec9fd7a825a
Author: Niels Thykier <niels at thykier.net>
Date:   Wed Jun 15 17:27:09 2016 +0000

    dh_strip: Use strip -D unconditionally for static libs
    
    Since binutils in stable supports "--enable-deterministic-archives"
    just pass it unconditionally.
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 debian/changelog |  3 +++
 dh_strip         | 12 ++++--------
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index fea6c6a..ba895dc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -38,6 +38,9 @@ debhelper (9.20160403+unreleased) UNRELEASED; urgency=medium
   * dh_installcatalos: Apply patch from Helmut Grohne to
     remove autoscript for a transition that completed in
     Wheezy.
+  * dh_strip: Unconditionally pass --enable-deterministic-archives
+    to strip for static libs as the stable version of binutils
+    supports it.
 
  -- Niels Thykier <niels at thykier.net>  Sat, 09 Apr 2016 09:20:32 +0000
 
diff --git a/dh_strip b/dh_strip
index fcb8c7a..72f340a 100755
--- a/dh_strip
+++ b/dh_strip
@@ -335,16 +335,12 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 	}
 
 	if (@static_libs) {
-		my $strip_help = qx{$strip 2>&1};
-		my @opts = ('--strip-debug', '--remove-section=.comment',
-			'--remove-section=.note');
-		if (index($strip_help, '--enable-deterministic-archives') > -1) {
+		foreach (@static_libs) {
 			# NB: The short variant (-D) is broken in Jessie
 			# (binutils/2.25-3)
-			push(@opts, '--enable-deterministic-archives');
-		}
-		foreach (@static_libs) {
-			doit($strip, @opts, $_);
+			doit($strip, '--strip-debug', '--remove-section=.comment',
+				 '--remove-section=.note', '--enable-deterministic-archives',
+				 $_);
 		}
 	}
 	if ($no_auto_dbgsym and $use_build_id > 1) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git




More information about the debhelper-devel mailing list