On Fri, Aug 05, 2011 at 03:23:44PM +0800, Ray Rashif wrote: > On 5 August 2011 07:35, Lukas Fleischer <archlinux@xxxxxxxxxxxxxx> wrote: > > My own opinion is that we shouldn't patch anything here. While using the > > same optimization flags for all packages might result in some kind of > > consistency, one of our main guidelines - not to do any unnecessary > > modifications - is kind of violated here. We should trust upstream > > having chosen any explicit optimization flags with care (in some cases, > > enforcing optimization flags might even lead to heavy performance > > impacts - although this is unlikely to happen). I am aware that there > > are some corner cases for sure, for which I'd say overriding CFLAGS is > > okay. However, this shouldn't be common practice, imho. > > > > Opinions? > > I have wondered about this before. Upstream developers should include > in their code/buildsystem proper conditional CFLAGS, i.e append to > system CFLAGS, override _only_ what they want to override, and don't > append anything already part of the system CFLAGS. > > For eg. some developers like to enforce -O3, so they should first get > the system CFLAGS and override it's -O*, if any. Well, just appending their own flags (which is what most Makefiles do) is no problem here as only the last "-O" option will matter (check my reply to Allan). > > But in general, I agree. We shouldn't enforce anything either unless > we're trying to fix something. +1. > 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. Yeah, I agree that patching is okay if it's necessary in order to build a package (or in order not to break anything). That's what I mentioned above.