Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Khem Raj <raj.khem@gmail.com>
To: Andre McCurdy <armccurdy@gmail.com>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] gcc-configure-common.inc: drop --enable-target-optspace from configure
Date: Mon, 1 Feb 2016 18:47:50 -0800	[thread overview]
Message-ID: <F583CDF2-1357-463D-AC7F-48C93A9C2436@gmail.com> (raw)
In-Reply-To: <CAJ86T=VMCnwns4grN6rWFg0z2oR7ifeSbo4Pf2o0te1ZOk2fOA@mail.gmail.com>

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


> On Feb 1, 2016, at 6:21 PM, Andre McCurdy <armccurdy@gmail.com> wrote:
> 
> On Mon, Feb 1, 2016 at 4:19 PM, Khem Raj <raj.khem@gmail.com> wrote:
>> What is the size increase in gcc runtime when u do this
> 
> No significant changes.
> 
> Binaries which link statically with libgcc all grow a little
> (somewhere between 10 and 50 bytes).
> 
> libgcc_s.so.1 itself grows by approx 1%:
> 
>   text       data        bss        dec        hex    filename
> 114896        516         56     115468      1c30c    libgcc_s.so.1 (-Os)
> 116148        516         56     116720      1c7f0    libgcc_s.so.1 (-O2)

Thanks, I am ok with this change. Can you also report a qemuppc build with this
change and make sure it boots ?

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


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

  reply	other threads:[~2016-02-02  2:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-01 22:01 [PATCH] gcc-configure-common.inc: drop --enable-target-optspace from configure Andre McCurdy
2016-02-02  0:19 ` Khem Raj
2016-02-02  2:21   ` Andre McCurdy
2016-02-02  2:47     ` Khem Raj [this message]
2016-02-03  0:36       ` Andre McCurdy
2016-02-03  0:41         ` Khem Raj

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=F583CDF2-1357-463D-AC7F-48C93A9C2436@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=armccurdy@gmail.com \
    --cc=openembedded-core@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