From 3483fe2969c3d1239e8281a1a0646e65b8b3beab Mon Sep 17 00:00:00 2001 From: Ned Ludd Date: Sat, 7 Jan 2006 13:13:31 +0000 Subject: [PATCH] - FEATURES=installsources from Olivier Crete an extention of splitdebug for better debugging when debugedit is installed. bug 112907 svn path=/main/trunk/; revision=2542 --- bin/prepstrip | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bin/prepstrip b/bin/prepstrip index 343a53353..47130e694 100755 --- a/bin/prepstrip +++ b/bin/prepstrip @@ -24,6 +24,16 @@ save_elf_debug() { mkdir -p $(dirname ${y}) ${CHOST}-objcopy --only-keep-debug ${x} ${y}.debug ${CHOST}-objcopy --add-gnu-debuglink=${y}.debug ${x} + + [ "${FEATURES//*installsources*/true}" != "true" ] && return 0 + + if [ -x /usr/bin/debugedit ] ; then + debugedit -b ${WORKDIR} -d /usr/src/debug/${P} -l ${T}/debug.sources "$x" + if [ -s ${T}/debug.sources ]; then + [ -d ${D}/usr/src/debug/${P} ] || mkdir -p ${D}/usr/src/debug/${P} + cat ${T}/debug.sources | (cd ${WORKDIR}; LANG=C sort -z -u | xargs -0 -- cp --parents -p --target-directory="${D}/usr/src/debug/${P}" ) + fi + fi } for x in $(scanelf -yRBF%F "$@") $(for y in "$@"; do find $y -type f -name '*.a' -print0 ; done); do -- 2.26.2