From: Mike Frysinger Date: Sun, 5 Jan 2014 14:38:59 +0000 (-0500) Subject: prepstrip: do no strip static libs when FEATURES=splitdebug X-Git-Tag: v2.2.8~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6dcc94c83bfcfd642d12558bf294e3c6ac0a81da;p=portage.git prepstrip: do no strip static libs when FEATURES=splitdebug When people have splitdebug enabled, they want debugging info to be available to them. Unfortunately, splitdebug doesn't work with static archives, so we have to leave it in. Stripping of that will be delayed to when the final ELF is linked. --- diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip index 64ea80d71..233238889 100755 --- a/bin/ebuild-helpers/prepstrip +++ b/bin/ebuild-helpers/prepstrip @@ -339,8 +339,13 @@ do if [[ ${f} == *"current ar archive"* ]] ; then __vecho " ${x:${#ED}}" if ${strip_this} ; then - # hmm, can we split debug/sources for .a ? - ${STRIP} -g "${x}" + # If we have split debug enabled, then do not strip this. + # There is no concept of splitdebug for objects not yet + # linked in (only for finally linked ELFs), so we have to + # retain the debug info in the archive itself. + if ! ${FEATURES_splitdebug} || ${RESTRICT_splitdebug} ; then + ${STRIP} -g "${x}" + fi fi elif [[ ${f} == *"SB executable"* || ${f} == *"SB shared object"* ]] ; then process_elf "${x}" "${inode_link}" ${PORTAGE_STRIP_FLAGS}