Openembedded Devel Discussions
 help / color / mirror / Atom feed
* [PATCH] gcc internal executables have debug information attached
@ 2011-03-07 18:23 Dick Hollenbeck
  0 siblings, 0 replies; only message in thread
From: Dick Hollenbeck @ 2011-03-07 18:23 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 2 bytes --]



[-- Attachment #2: 0001-cc1-and-cc1plus-had-about-20-mbytes-of-debug-informa.patch --]
[-- Type: text/x-patch, Size: 1864 bytes --]

From 75515b7abc69c9161c7acef0d2630cb94eabb05f Mon Sep 17 00:00:00 2001
From: Dick Hollenbeck <dick@softplc.com>
Date: Mon, 7 Mar 2011 12:12:48 -0600
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.

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-03-07 18:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-07 18:23 [PATCH] gcc internal executables have debug information attached Dick Hollenbeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox