teknoraver / rpms / rpm

Forked from rpms/rpm 4 months ago
Clone

Blame rpm-4.12.0-eu-strip-g-option.patch

Lubos Kardos 9fa2c4
From 0f051ab3b5b7a5342029e49b9a72ec7499a3d6ad Mon Sep 17 00:00:00 2001
Lubos Kardos 9fa2c4
From: Lubos Kardos <lkardos@redhat.com>
Lubos Kardos 9fa2c4
Date: Fri, 27 Mar 2015 15:45:57 +0100
Lubos Kardos 9fa2c4
Subject: [PATCH] Pass _find_debuginfo_opts -g to eu-strip for executables
Lubos Kardos 9fa2c4
 (rhbz:#1186563)
Lubos Kardos 9fa2c4
Lubos Kardos 9fa2c4
---
Lubos Kardos 9fa2c4
 scripts/find-debuginfo.sh | 5 +++--
Lubos Kardos 9fa2c4
 1 file changed, 3 insertions(+), 2 deletions(-)
Lubos Kardos 9fa2c4
Lubos Kardos 9fa2c4
diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
Lubos Kardos 9fa2c4
index 264fad5..17522e0 100644
Lubos Kardos 9fa2c4
--- a/scripts/find-debuginfo.sh
Lubos Kardos 9fa2c4
+++ b/scripts/find-debuginfo.sh
Lubos Kardos 9fa2c4
@@ -7,7 +7,7 @@
Lubos Kardos 9fa2c4
 #			   [[-l filelist]... [-p 'pattern'] -o debuginfo.list]
Lubos Kardos 9fa2c4
 #			   [builddir]
Lubos Kardos 9fa2c4
 #
Lubos Kardos 9fa2c4
-# The -g flag says to use strip -g instead of full strip on DSOs.
Lubos Kardos 9fa2c4
+# The -g flag says to use strip -g instead of full strip on DSOs or EXEs.
Lubos Kardos 9fa2c4
 # The --strict-build-id flag says to exit with failure status if
Lubos Kardos 9fa2c4
 # any ELF binary processed fails to contain a build-id note.
Lubos Kardos 9fa2c4
 # The -r flag says to use eu-strip --reloc-debug-sections.
Lubos Kardos 9fa2c4
@@ -23,7 +23,7 @@
Lubos Kardos 9fa2c4
 # All file names in switches are relative to builddir (. if not given).
Lubos Kardos 9fa2c4
 #
Lubos Kardos 9fa2c4
 
Lubos Kardos 9fa2c4
-# With -g arg, pass it to strip on libraries.
Lubos Kardos 9fa2c4
+# With -g arg, pass it to strip on libraries or executables.
Lubos Kardos 9fa2c4
 strip_g=false
Lubos Kardos 9fa2c4
 
Lubos Kardos 9fa2c4
 # with -r arg, pass --reloc-debug-sections to eu-strip.
Lubos Kardos 9fa2c4
@@ -100,6 +100,7 @@ strip_to_debug()
Lubos Kardos 9fa2c4
   $strip_r && r=--reloc-debug-sections
Lubos Kardos 9fa2c4
   $strip_g && case "$(file -bi "$2")" in
Lubos Kardos 9fa2c4
   application/x-sharedlib*) g=-g ;;
Lubos Kardos 9fa2c4
+  application/x-executable*) g=-g ;;
Lubos Kardos 9fa2c4
   esac
Lubos Kardos 9fa2c4
   eu-strip --remove-comment $r $g -f "$1" "$2" || exit
Lubos Kardos 9fa2c4
   chmod 444 "$1" || exit
Lubos Kardos 9fa2c4
-- 
Lubos Kardos 9fa2c4
1.9.3
Lubos Kardos 9fa2c4