[arch-general] Enforcing CFLAGS in PKGBUILDs

Ray Rashif schiv at archlinux.org
Fri Aug 5 03:23:44 EDT 2011


On 5 August 2011 07:35, Lukas Fleischer <archlinux at cryptocrack.de> 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.

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


--
GPG/PGP ID: 8AADBB10


More information about the arch-general mailing list