[4.0] Use strip (instead of eu-strip) to support --strip-debug of *.so at build time 92/111792/1 tizen submit/tizen/20190515.001312 submit/tizen/20210223.121535
authorGeunsik Lim <geunsik.lim@samsung.com>
Mon, 23 Jan 2017 11:04:31 +0000 (20:04 +0900)
committerGeunsik Lim <geunsik.lim@samsung.com>
Tue, 24 Jan 2017 04:18:46 +0000 (13:18 +0900)
eu-strip can not normally remove debugging symbols in case of a large so file
such as libchromium-efl.so (2.8GiB) at build time. The up-to-date version of
eu-strip handles this issue by merging the commit that was submitted by
Mark Wielaard as following:
http://www.mail-archive.com/elfutils-devel@lists.fedorahosted.org/msg04444.html

In order to avoid eu-strip modification such as backporting, use strip(binutils)
instead of eu-strip(elfutils) because the existing strip has already fixed this issue.
before) eu-strip --remove-comment $g $strip_option -f "$1" "$2" || exit
after)  strip --remove-section=.comment  $g $strip_option -o "$1" "$2" || exit

* build error:
eu-strip: /home/abuild/rpmbuild/BUILDROOT/chromium-efl-53.2785.0.36-1.arm/usr/
lib/libchromium-ewk.so: INTERNAL ERROR 936 (0.153-Jan  6 2017): cannot read data from file

* unit test:
$ sudo chroot ~/GBS-ROOT/local/BUILD-ROOTS/scratch.armv7l.0/ /bin/bash
$ strip --remove-section=.comment -g ./libchromium-efl.so
$ ls -al

* evaluation:
$ sudo chroot ~/GBS-ROOT/local/BUILD-ROOTS/scratch.armv7l.0/ /bin/bash
$ rpm -ivh rpm-build-4.11.0.1-0.armv7l.rpm --force --nodeps
$ git checkout tizen_m53_beta
$ gbs build --define "nodebug 0" ......
  (or ./tizen_src/build/build_mobile.sh -P tzmb_v3.0_target-TM1_mirror -A armv7l)

Change-Id: I7ae755b1f4570a28c0fc3088801b12f2ffd21808
Reported-by: Youngsoo Choi <kenshin.choi@samsung.com>
Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
Reviewed-by: Dongkyun Son <dongkyun.s@samsung.com>
scripts/find-debuginfo.sh

index 885b9b1..aac635d 100644 (file)
@@ -127,7 +127,7 @@ strip_to_debug()
           eu-strip --remove-comment $r $strip_option -f "$1" "$2" || exit
           ;;
       *)
-          eu-strip --remove-comment $g $strip_option -f "$1" "$2" || exit
+          strip --remove-section=.comment  $g $strip_option -o "$1" "$2" || exit
   esac
   chmod 444 "$1" || exit
 }