summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeunsik Lim <geunsik.lim@samsung.com>2017-02-11 23:25:40 +0900
committerGeunsik Lim <geunsik.lim@samsung.com>2017-02-14 15:44:40 +0900
commit687f1071d56dba1ba668437716d7033770fdf766 (patch)
tree315334ad7576b07a75e0d4d96bbefd27e3b7938e
parent28cbc50050cdb3b3fbd84681c414ceeedf3facc1 (diff)
downloadrpm-687f1071d56dba1ba668437716d7033770fdf766.tar.gz
rpm-687f1071d56dba1ba668437716d7033770fdf766.tar.bz2
rpm-687f1071d56dba1ba668437716d7033770fdf766.zip
[4.0] Support alternative way to choose between strip and eu-stripsubmit/tizen_base/20170216.050845accepted/tizen/base/20170217.190209
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/<git-package-name>.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 <geunsik.lim@samsung.com>
-rw-r--r--scripts/find-debuginfo.sh8
1 files changed, 7 insertions, 1 deletions
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
}