Ken Moffat wrote:
>  For i?86, when we force it to build for m486 we also add -O3.  I've
> been using -O3 for glibc on x86_64 in case it turns out to be
> beneficial.  On my old single processor machines, I doubt that it
> helped, but my suspicions about it are actually raised by results on
> my phonon which definitely has enough horsepower.
> 
>  On LFS-7.1 I noted ldd segfaulted for one of the gst plugins
> packages near the end of my system build, but that eventually built
> ok.  On my i3, no problems.
> 
>  Now I'm doing my first test build of current svn, mainly to iron
> out the bugs in my scripts, and then to sort out the changes for the
> first part of my desktop scripts.  Here, glibc bombs out very
> quickly (internal compiler error, segmentation fault in vfscanf.c)
> .
>  Did it twice, so at that point I dropped back to -O2 and it was ok.
> Perhaps I should mention that everything else using my own CFLAGS
> uses -O2, it's only glibc where I've tried -O3.
> 
>  Has anyone seen similar problems with -O3 in glibc (or, converesely,
> has anyone used -O3 without any problems) ?  I can see that I'll have
> to have a go at recompiling glibc when the LFS packages have finished,
> and then (if it still crashes), have to work out how to get the
> preprocessed source.  I'm hoping its just a problem with the
> temporary version of gcc in /tools.
> 
>  I'm just glad I'm not doing this on a slow i686 box :)

http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html

-O3 turns on
-finline-functions
-funswitch-loops
-fpredictive-commoning
-fgcse-after-reload
-ftree-vectorize
-fipa-cp-clone

I know that inline functions can cause problems at times.  Personally, I go 
with 
the upstream default optimizations.  I don't think any improvements would be 
worth the risk.  If I were developing compute intensive sw, I'd pay attention, 
but for a general purpose library, the devs know best.

Note that I *have* done compute intensive sw and sometimes it does make the 
difference of an 18 hour run instead of a 24 hour run.  However, I don't think 
the standard libraries are the place for this type of optimization.

That said, have fun...

   -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to