I'm trying to update a pkgsrc-wip package, but the new source fails to
build within pkgsrc (direct ./configure && gmake works fine). It turns
out that this is due to CFLAGS containing `-O2' when the package is
configured via pkgsrc:
/usr/bin/env [...] CC=gcc 'CFLAGS=-O2 -pipe -I/usr/pkg/include [...]'
/bin/sh './configure' [...]
Hopefully this problem will be solved upstream. But, still, I'd like
to know how to prevent CFLAGS from containing `-O2', and, in general,
how to control the setting of CFLAGS.