Comment 3 for bug 1018128

Revision history for this message
Yavor Nikolov (yavor-nikolov) wrote :

* I wonder if it makes sense to change in Makefile assignments from "=" to "+=".

* I took a look at the Ubuntu packaging customizations (Debian should be same) - seems they're setting relevant flags outside and we make is called with arguments:
make CFLAGS=... LDFLAGS=...
which seems to take priority over all CFLAGS and LDFLAGS assignments we have in the Makefile.

* In Gentoo:
 - they have similar to Fedora approach - they're removing initial CC and CFLAGS assignments and leaving all rest with +=
 - they're replacing CFLAGS with CXXFLAGS, CC with CXX, LDFLAGS with LIBS (and are still actually passing LDFLAGS to compiler so it's more like they separate ld flags from libs).

So:
 * If anyone wants to pass additional flags or overwrite the ones in Makefile: it's possible to do so. (Even if we don't change = to +=)
 * Splitting LDFLAGS and LIBS maybe makes sense too. It's unlikely someone to want to replace LIBS, more often LDFLAGS will be tweaked.
 * Having OPTFLAGS separated from CFLAGS/CXXFLAGS may make some sense too.
 * Changes on these may affect customizations patches of the various package maintainers. (Shouldn't be a huge problem, it's not a big change, we don't do this very frequently, will hopefully allow better alignment with their environments).