From patchwork Mon Mar 7 18:33:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: 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, 07 Mar 2011 18:33:31 -0000 From: Dick Hollenbeck X-Patchwork-Id: 1199 Message-Id: <1299522811-2065-1-git-send-email-dick@softplc.com> To: openembedded-devel@lists.openembedded.org Cc: Dick Hollenbeck Signed-off-by: Dick Hollenbeck --- 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 }