Re: Enforcing CFLAGS in PKGBUILDs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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.



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux