<p dir="ltr">What is the size increase in gcc runtime when u do this</p>
<div class="gmail_quote">On Feb 1, 2016 2:01 PM, &quot;Andre McCurdy&quot; &lt;<a href="mailto:armccurdy@gmail.com">armccurdy@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Configuring gcc with --enable-target-optspace (which causes gcc to<br>
append &quot;-g -Os&quot; to the default CFLAGS_FOR_TARGET and so force libgcc<br>
etc target libraries to always be optimised for size) dates back to<br>
the very first commit in oe-core git in 2005 (for gcc 3.4.3).<br>
<br>
Configuring gcc with --enable-target-optspace is not done widely<br>
elsewhere (it&#39;s not used for Ubuntu or Fedora host gcc, the Linaro<br>
binary toolchain or in Buildroot since early 2015). Sometime around<br>
gcc 4.5.x it caused problems for powerpc and so was disabled for that<br>
architecture:<br>
<br>
  <a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43810" rel="noreferrer" target="_blank">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43810</a><br>
<br>
This patch removes --enable-target-optspace completely (ie powerpc is<br>
no longer a special case) and allows optimisation of libgcc etc to be<br>
controlled directly by the flags present in TARGET_CFLAGS.<br>
<br>
Signed-off-by: Andre McCurdy &lt;<a href="mailto:armccurdy@gmail.com">armccurdy@gmail.com</a>&gt;<br>
---<br>
 meta/recipes-devtools/gcc/gcc-configure-common.inc | 8 --------<br>
 meta/recipes-devtools/gcc/gcc-cross-initial.inc    | 1 -<br>
 2 files changed, 9 deletions(-)<br>
<br>
diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc<br>
index 85e69db..f4f76bd 100644<br>
--- a/meta/recipes-devtools/gcc/gcc-configure-common.inc<br>
+++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc<br>
@@ -14,13 +14,6 @@ JAVA_sh3 ?= &quot;&quot;<br>
 # gcc 3.x expects &#39;f77&#39;, 4.0 expects &#39;f95&#39;, 4.1 and 4.2 expect &#39;fortran&#39;<br>
 FORTRAN ?= &quot;,f77&quot;<br>
 LANGUAGES ?= &quot;c,c++${FORTRAN}${JAVA}&quot;<br>
-# disable --enable-target-optspace for powerpc SPE<br>
-# at -Os libgcc.so.1 creates references into<br>
-# hidden symbols in libgcc.a which linker complains<br>
-# when linking shared libraries further in the build like (gnutls)<br>
-<br>
-SPECIAL_ARCH_LIST = &quot;powerpc&quot;<br>
-OPTSPACE = &#39;${@bb.utils.contains(&quot;SPECIAL_ARCH_LIST&quot;, &quot;${TARGET_ARCH}&quot;, &quot;&quot;, &quot;--enable-target-optspace&quot;,d)}&#39;<br>
<br>
 EXTRA_OECONF_BASE ?= &quot;&quot;<br>
 EXTRA_OECONF_PATHS ?= &quot;&quot;<br>
@@ -42,7 +35,6 @@ EXTRA_OECONF = &quot;\<br>
     --enable-libstdcxx-pch \<br>
     --program-prefix=${TARGET_PREFIX} \<br>
     --without-local-prefix \<br>
-    ${OPTSPACE} \<br>
     ${EXTRA_OECONF_BASE} \<br>
     ${EXTRA_OECONF_GCC_FLOAT} \<br>
     ${EXTRA_OECONF_PATHS} \<br>
diff --git a/meta/recipes-devtools/gcc/gcc-cross-initial.inc b/meta/recipes-devtools/gcc/gcc-cross-initial.inc<br>
index 910f2ef..048b530 100644<br>
--- a/meta/recipes-devtools/gcc/gcc-cross-initial.inc<br>
+++ b/meta/recipes-devtools/gcc/gcc-cross-initial.inc<br>
@@ -22,7 +22,6 @@ EXTRA_OECONF = &quot;\<br>
     --disable-multilib \<br>
     --disable-__cxa_atexit \<br>
     --enable-languages=c \<br>
-    ${OPTSPACE} \<br>
     --program-prefix=${TARGET_PREFIX} \<br>
     --with-sysroot=/not/exist \<br>
     --with-build-sysroot=${GCCCROSS_BUILDSYSROOT} \<br>
--<br>
1.9.1<br>
<br>
--<br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</blockquote></div>