[OE-core] why do we poison -Os?
richard.purdie at linuxfoundation.org
Wed Aug 24 01:45:03 UTC 2011
On Tue, 2011-08-23 at 20:32 -0500, Kumar Gala wrote:
> 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?
We were seeing problems when makefiles were putting -Os into compiler
flags without our knowledge. In some cases -Os was silently corrupting
binaries. We therefore ended up adding the poison so if anything was
using the option we knew to generate buggy code, we'd know about it.
If we know gcc to be safe using that option we can drop the patch and
users can enable it where it makes sense to them. I still don't like
makefiles changing compiler optimisations from under us though. Last I
heard, -Os was still very badly supported and not recommended by the gcc
More information about the Openembedded-core