On 8 April 2013 15:18, Thomas Bächler <thomas@archlinux.org> wrote:
Am 08.04.2013 08:54, schrieb Allan McRae:
What do we do? Do we need to ignore the fact the this should be in CPPFLAGS and move it back to C{,XX}FLAGS?
The other options is for packages that are affected by this to unset the CPPFLAGS and add it to CFLAGS in the PKGBUILD, but I have no idea how many packages this affects. What portion of KDE and GNOME were built with pacman-4.1?
So, as far as I understand, we're supposed to identify this issue from lines like: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp] (e.g. output from i686 build of unsupported package gcc-gcj) But should there be any case where this warning is not shown? Say, for e.g., if -Wcpp or -Wall is not used? ...
In PKGBUILD:
CPPFLAGS="$CPPFLAGS -O2" - problem solved.
... If not, then we don't really need any kind of conditioning to recognise it. Editing buildscripts to unset CPPFLAGS (or append -O[n] to it) would be fine in that case, but if there are non-intrusive alternatives we should pursue them. Deciding on [n] for O[n] is really not the business of the buildscript, and you'd want to move the affected flag (back) to C{,XX}FLAGS if you don't append. You can do either of them properly, sure, but not as a clean one-liner (you'd have to at least grep [n] from somewhere). -- GPG/PGP ID: C0711BF1