[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

dh_strip should look at STRIP



Package: debhelper
Version: 2.0.98
Severity: wishlist

I've been using dpkg-cross to cross-compile debs for the parisc port. 
dkpg-cross provides a replacement dpkg-buildpackage wrapper that nicely sets 
up your environment so the build uses the right tools. One thing it does is 
set the environment variable STRIP to the location of the strip program for 
the architecture you are cross-compiling for. It would be nice if dh_strip 
would pay attention to that variable and strip the binaries properly.

Attached is a diff for dh_strip that uses STRIP if set. Please consider adding 
it.

Thanks,

-- 
Matt Taggart
taggart@fc.hp.com

--- dh_strip.old	Tue Jun 27 19:34:47 2000
+++ dh_strip	Tue Jun 27 19:35:38 2000
@@ -6,6 +6,12 @@
 use Debian::Debhelper::Dh_Lib;
 init();
 
+if ($ENV{'STRIP'}) {
+        $strip=$ENV{'STRIP'}
+} else {
+        $strip="strip";
+}
+
 # Check if a file is an elf binary, shared library, or static library,
 # for use by File::Find. It'll fill the following 3 arrays with anything
 # it finds:
@@ -57,14 +63,14 @@
 	foreach (@shared_libs) {
 		# Note that all calls to strip on shared libs
 		# *must* inclde the --strip-unneeded.
-		doit("strip","--remove-section=.comment","--remove-section=.note","--strip-unneeded",$_);
+		doit("$strip","--remove-section=.comment","--remove-section=.note","--strip-unneeded",$_);
 	}
 	
 	foreach (@executables) {
-		doit("strip","--remove-section=.comment","--remove-section=.note",$_);
+		doit("$strip","--remove-section=.comment","--remove-section=.note",$_);
 	}
 
 	foreach (@static_libs) {
-		doit("strip","--strip-debug",$_);
+		doit("$strip","--strip-debug",$_);
 	}
 }

Reply to: