summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/prepstrip3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/prepstrip b/bin/prepstrip
index 47130e694..f93fe9eaa 100755
--- a/bin/prepstrip
+++ b/bin/prepstrip
@@ -21,6 +21,9 @@ save_elf_debug() {
[ "${FEATURES//*splitdebug*/true}" != "true" ] && return 0
+ # dont save debug info twice.
+ [ "${x:7}" == ".debug" ] && return 0
+
mkdir -p $(dirname ${y})
${CHOST}-objcopy --only-keep-debug ${x} ${y}.debug
${CHOST}-objcopy --add-gnu-debuglink=${y}.debug ${x}