On 5 August 2011 16:54, Jan de Groot <jan@xxxxxxxxxxxxxx> wrote: > On Fri, 2011-08-05 at 15:23 +0800, Ray Rashif wrote: > >> For eg. some developers like to enforce -O3, so they should first get >> the system CFLAGS and override it's -O*, if any. >> >> But in general, I agree. We shouldn't enforce anything either unless >> we're trying to fix something. The ardour PKGBUILD does this [1], >> maybe it shouldn't, but I assume the -O3 becomes redundant when we >> pass system CFLAGS to the build as a configuration flag. >> >> [1] http://projects.archlinux.org/svntogit/packages.git/tree/ardour/trunk/PKGBUILD > > Looking at ardour, I see it's also patched to support gcc 4.6. Now let's > say something about -O3: -O3 optimization can be very bad and the > results are extremely dependent on the compiler version. Something that > works optimal with gcc 4.4 and -O3 can break completely with gcc 4.6 and > -O2. > Just adding -O3 to CFLAGS without knowing which compiler is used is > plain stupid. Check this blog for example: > http://glandium.org/blog/?p=1975 > There someone from Mozilla claims they're finally able to build with O3 > +PGO with GCC 4.5. This was at the time we were already doing O2+PGO > from our PKGBUILD with 4.5 and now 4.6. Good that you bring this up - I was totally unaware of this correlation. -- GPG/PGP ID: 8AADBB10