Current mozilla-firefox ebuild enables gcc optimization levels up to -O2 in 32-bit archs. I think this should also include -Os, as it is below -O2 and also quite popular in Gentoo community. I have been running Firefox compiled with -Os since it was released and haven't had any stability problems or segfaults yet.
Created attachment 25600 [details, diff] patch against current firefox ebuild Patch that enables -Os optimizations in firefox ebuild
Created attachment 25601 [details, diff] firefox-Os.diff there was a syntax error in first patch
to be tested this could be put into ~x86 with a quick warning at the top, saying that its unlikely to go wrong but heres what to do if it does... however they might have cut out -Os for a reason, need to wait and see what the moz ppl say
Thanks for the suggestion guys. At this point I'm not willing to enable -Os for mozilla, firefox, thunderbird. The reason is simply that when we allow optimization other than the ones we know work for those ebuilds, then we get into trouble with lots of bug reports about them not working. We've been burned by this in the past. If you want to enable -Os in your ebuilds, please go ahead in your own overlay, but don't report any bugs about it. ;-) I don't really see the point personally.