https://bugs.openldap.org/show_bug.cgi?id=9525
--- Comment #1 from Howard Chu hyc@openldap.org --- (In reply to Quanah Gibson-Mount from comment #0)
Currently the contrib makefiles use a variable "OPT", instead they should be fixed to correctly honor CFLAGS, CPPFLAGS, and LDFLAGS as appropriate
No.
CFLAGS / CPPFLAGS are to control non-optimization-related compilation flags. OPT is to control optimization only, without changing any other aspect of the build.
In particular, CFLAGS comprises the entire set of flags; overriding CFLAGS from the make commandline usually means you have to either redundantly specify a lot of important flags, or lose them in the process.