From 687f1071d56dba1ba668437716d7033770fdf766 Mon Sep 17 00:00:00 2001 From: Geunsik Lim Date: Sat, 11 Feb 2017 23:25:40 +0900 Subject: [4.0] Support alternative way to choose between strip and eu-strip This commit is to solve a stripping issue of chromium-efl (m53). Note that up-to-date elfutils package(e.g., the elfutils version 0.168 (3a45dbbe7) have fixed this issue. However, GPLv3 is a problem. Let's support an alternative way to choose between strip (binutils) and eu-strip (elfutils) to handle in case of a large shared object such as chromium project. The default strip of rpmbuild is eu-strip. * Case study: chromium-efl(m53) Here is how to replace eu-strip (elfutils) with strip (binutils): $ vi ./packaging/.spec # Let's replace eu-strip (elf-utils) with strip (binutils) in %install. export STRIP_DEFAULT_PACKAGE="binutils" Change-Id: Idca08e2f65ea084c6b5eb3c5cd218477f6da1a5f Signed-off-by: Geunsik Lim --- scripts/find-debuginfo.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh index 105e8fe55..e8ff02f02 100644 --- a/scripts/find-debuginfo.sh +++ b/scripts/find-debuginfo.sh @@ -133,7 +133,13 @@ strip_to_debug() eu-strip --remove-comment $r $strip_ko_option -f "$1" "$2" || exit ;; *) - strip --remove-section=.comment $g $strip_option -o "$1" "$2" || exit + # Support an alternative way to choose between strip (binutils) and + # eu-strip (elfutils) to handle a large shared object (e.g. chromium) + if [ "$STRIP_DEFAULT_PACKAGE" != "binutils" ]; then + eu-strip --remove-comment $g $strip_option -f "$1" "$2" || exit + else + strip --remove-section=.comment $g $strip_option -o "$1" "$2" || exit + fi esac chmod 444 "$1" || exit } -- cgit v1.2.3