]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_strip
dh_strip: In v9, pass --compress-debug-sections to objcopy. Needs a new enough binuti...
[debhelper.git] / dh_strip
index a38a66be30fb46494babc45bfa8490fc089b3725..aebc10096990b61374d80ccd4abc37bc74e1aba7 100755 (executable)
--- a/dh_strip
+++ b/dh_strip
@@ -166,7 +166,12 @@ sub make_debug {
        if (! -d $debug_dir) {
                doit("install", "-d", $debug_dir);
        }
-       doit($objcopy, "--only-keep-debug", $file, $debug_path);
+       if(compat(8)) {
+               doit($objcopy, "--only-keep-debug", $file, $debug_path);
+       }
+       else {
+               doit($objcopy, "--only-keep-debug --compress-debug-sections", $file, $debug_path);
+       }
        # No reason for this to be executable.
        doit("chmod", 644, $debug_path);
        return $debug_path;