On Thu, 2018-08-30 at 09:15 +0200, Joakim Tjernlund wrote: > On Wed, 2018-08-29 at 23:58 +0100, Sergei Trofimovich wrote: > > CAUTION: This email originated from outside of the organization. Do not > > click links or open attachments unless you recognize the sender and know > > the content is safe. > > > > > > On Wed, 29 Aug 2018 20:10:54 +0000 > > Joakim Tjernlund <joakim.tjernl...@infinera.com> wrote: > > > > > Is there a way for portage to avoid strippning debug syms for ld.so ? > > > > Tweaking ebuild to expand STRIP_MASK for ld.so might help. > > OK, can I use STRIP_MASK outside ebuilds, like in /etc/portage/make.conf or > in my profile? Something like STRIP_MASK="/lib64/ld-* /lib/ld-*" > > > > > > I would like to avoid building all of glibc with debug syms. > > > > s/building/installing, right? > > Right :) I need to keep the stuff valgrind need. Don't recall if that > just needs an unstripped ld.so or if ld.so needs debug syms as well. > > > > > You will have to build all (or large part) of glibc with debug > > symbols anyways as ld.so is linked of multiple source files. > > Yes, I just need to build glibc with -g and avoid stripping ld.so > > I think this should be default/USE flag for glibc, it would be a > nice feature so one does not need to rebuild glibc(and extra space) > run valgrind.
Arch seems to keep syms too: https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/glibc#n178 # Do not strip these for gdb and valgrind functionality, but strip the rest find "$pkgdir"/usr/lib \ -not -name 'ld-*.so' \ -not -name 'libc-*.so' \ -not -name 'libpthread-*.so' \ -not -name 'libthread_db-*.so' \ -name '*-*.so' -type f -exec strip $STRIP_SHARED {} + 2> /dev/null || true