Richard Freeman posted
<[EMAIL PROTECTED]>, excerpted below,
 on Tue, 28 Jun 2005 11:11:35 -0400:

> On Tue, June 28, 2005 10:47 am, Mauro Venanzi said:
>> why have you the "Os" flag? waht is it?
>> the same dubt for mtune
>> try to write -O2  not Os
> 
> -Os optimizes for size and works just fine for me.  In systems with
> limited RAM it is likely to give better performance than -O2 since you are
> less likely to swap.  Most of the optimizations are the same, except that
> you aren't going to unroll loops or anything like that.  Many of the
> size-sacrificing optimizations don't add much performance-wise in the
> first place.
> 
> I believe that somebody posted a lengthy discussion regarding compiler
> optimizations in the forums complete with benchmarks.  This largely
> influenced my decision to switch to -Os since at the time I was running
> with 512MB RAM.  Now I'm at 1GB, but even so I wouldn't say have RAM to
> burn, and disk cache is probably going to do more for performance than
> having loops unrolled...

Exactly, and I'm an -Os person myself.  However, if something goes
haywire, I do at times try recompiling with "-march=k8 -O2 -pipe" (or even
-O1), just to be sure.

The last time I had a similar problem, it was an issue with 32-bit only,
and due to the glibc I was using (the masked version for use with an also
masked gcc4).  The 64-bit glibc was working fine, but further updates to
gcc or sandbox were failing, when they tried to do the config for their
32-bit compile sections.  The problem was solved by emerge --packageonly
a previous (and unmasked) glibc version.  Since I use FEATURES=buildpkg,
that was easily done.  Note that emerging a binpkg doesn't require a
working gcc...

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman in
http://www.linuxdevcenter.com/pub/a/linux/2004/12/22/rms_interview.html


-- 
[email protected] mailing list

Reply via email to