Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: Dick Hollenbeck <dick@softplc.com>
To: openembedded-devel@lists.openembedded.org
Cc: Dick Hollenbeck <dick@softplc.com>
Subject: [PATCH] cc1 and cc1plus had about 20 mbytes of debug information each, in the final redistributable form. This patch strips those two binaries yielding a savings of about 40 mbytes per SDK.
Date: Mon,  7 Mar 2011 12:33:31 -0600	[thread overview]
Message-ID: <1299522811-2065-1-git-send-email-dick@softplc.com> (raw)

Signed-off-by: Dick Hollenbeck <dick@softplc.com>
---
 recipes/gcc/gcc-package-sdk.inc    |    5 +++++
 recipes/gcc/gcc-package-target.inc |    5 +++++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/recipes/gcc/gcc-package-sdk.inc b/recipes/gcc/gcc-package-sdk.inc
index 1b6529f..54452fa 100644
--- a/recipes/gcc/gcc-package-sdk.inc
+++ b/recipes/gcc/gcc-package-sdk.inc
@@ -65,4 +65,9 @@ do_install () {
 			fi
 		done
 	fi
+
+    # Manually strip unneeded debug info from files that were not being stripped
+    ${BUILD_STRIP} ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1${EXEEXT}
+    ${BUILD_STRIP} ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus${EXEEXT}
+    ${BUILD_STRIP} ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/collect2${EXEEXT}
 }
diff --git a/recipes/gcc/gcc-package-target.inc b/recipes/gcc/gcc-package-target.inc
index 438c314..2a415be 100644
--- a/recipes/gcc/gcc-package-target.inc
+++ b/recipes/gcc/gcc-package-target.inc
@@ -168,4 +168,9 @@ GROUP ( libgcc_s.so.1 libgcc.a )" > ${D}${libdir}/libgcc_s.so
 
 	# Remove precompiled c++ headers as they are really big
 	rm -rf ${D}${includedir}/c++/${BINV}/${TARGET_SYS}/bits/*.gch
+
+    # Manually strip unneeded debug info from files that were not being stripped
+    ${STRIP} ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1
+    ${STRIP} ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus
+    ${STRIP} ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/collect2
 }
-- 
1.7.0.4




             reply	other threads:[~2011-03-07 18:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-07 18:33 Dick Hollenbeck [this message]
2011-03-07 19:08 ` [PATCH] cc1 and cc1plus had about 20 mbytes of debug information each, in the final redistributable form. This patch strips those two binaries yielding a savings of about 40 mbytes per SDK Tom Rini
  -- strict thread matches above, loose matches on Subject: below --
2011-03-07 19:57 Dick Hollenbeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1299522811-2065-1-git-send-email-dick@softplc.com \
    --to=dick@softplc.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox