From 6dcc94c83bfcfd642d12558bf294e3c6ac0a81da Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 5 Jan 2014 09:38:59 -0500 Subject: [PATCH] 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. --- bin/ebuild-helpers/prepstrip | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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} -- 2.26.2