Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Kumar Gala <galak@kernel.crashing.org>
To: "Xu, Dongxiao" <dongxiao.xu@intel.com>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: why do we poison -Os?
Date: Tue, 23 Aug 2011 20:32:16 -0500	[thread overview]
Message-ID: <0597F428-97F2-461F-804B-FE793E911BD4@kernel.crashing.org> (raw)
In-Reply-To: <D5AB6E638E5A3E4B8F4406B113A5A19A12D724C903@shsmsx501.ccr.corp.intel.com>

If tinylogin is the only issue why modify/patch gcc?  I see we have meta/recipes-core/tinylogin/tinylogin-1.4/use_O2_option.patch to deal with this?

Not allowing -Os at all, which is our current situation on PPC is problematic.  So trying to see if this issue is really limited to gcc 4.5 or not.  How can I reproduce it with current poky.git?

- k

On Aug 23, 2011, at 8:16 PM, Xu, Dongxiao wrote:

> Hi Kumar,
> 
> The background of this commit is, when I upgraded PowerPC gcc to 4.5, tinylogin would crash with certain GCC build parameters.
> 
> The root cause for that bug is, if enabled both "-frename-registers" and "-Os" options to build tinylogin in powerpc architecture, the tinylogin/getty application will encounter segmentation fault. Other combinations like "-frename-registers and -O2" or only "-Os" will not trigger this issue.
> 
> Poky cross environment provides the "-frename-registers" parameter, however it does not provide -Os option since "--enable-target-optspace" option is disabled for powerpc gcc. The "-Os" option in tinylogin is added by its own Makefile.
> 
> This commit is to prevent the above case. If --enable-target-optspace is disabled for GCC, "-Os" should not be added by recipe.
> 
> Thanks,
> Dongxiao
> 
>> -----Original Message-----
>> From: Kumar Gala [mailto:galak@kernel.crashing.org]
>> Sent: Wednesday, August 24, 2011 8:53 AM
>> To: Xu, Dongxiao
>> Cc: Patches and discussions about the oe-core layer; Khem Raj
>> Subject: why do we poison -Os?
>> 
>> Dongxiao,
>> 
>> Can you explain why this was needed:
>> 
>> commit ce456306dad3fdf42494830011dacae213c48edf
>> Author: Dongxiao Xu <dongxiao.xu@intel.com>
>> Date:   Sat Sep 25 10:16:26 2010 +0800
>> 
>>    gcc: enable poison parameters detection
>> 
>>    If not configured with --enable-target-optspace, gcc will report
>>    errors if there is '-Os' optimization in parameters.
>> 
>>    This fixes [BUGID #342]
>> 
>>    Also add "--enable-target-optspace" option to arm gcc configuration.
>> 
>>    Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
>> 
>> 
>> - k




  parent reply	other threads:[~2011-08-24  1:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-24  0:52 why do we poison -Os? Kumar Gala
2011-08-24  1:16 ` Xu, Dongxiao
2011-08-24  1:31   ` Kumar Gala
2011-08-24  1:32   ` Kumar Gala [this message]
2011-08-24  1:45     ` Richard Purdie
2011-08-24  4:02       ` Kumar Gala
2011-08-24  1:47     ` Xu, Dongxiao
2011-08-24  4:06       ` Kumar Gala
2011-08-24 10:52       ` Phil Blundell
2011-08-24 16:14         ` 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=0597F428-97F2-461F-804B-FE793E911BD4@kernel.crashing.org \
    --to=galak@kernel.crashing.org \
    --cc=dongxiao.xu@intel.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