[OE-core] why do we poison -Os?
Xu, Dongxiao
dongxiao.xu at intel.com
Wed Aug 24 01:16:17 UTC 2011
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 at 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 at 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 at intel.com>
>
>
> - k
More information about the Openembedded-core
mailing list