On 15 Nov 2013, at 14:44, Andriy Gapon <a...@freebsd.org> wrote: > I wonder what is the thinking behind CFLAGS cleansing in the following snippet > from bsd.port.mk: > > .if defined(WITH_DEBUG) && !defined(WITHOUT_DEBUG) > STRIP_CMD= ${TRUE} > DEBUG_FLAGS?= -g > CFLAGS:= ${CFLAGS:N-O*:N-fno-strict*} ${DEBUG_FLAGS} > .endif > > If I want to control optimization level for WITH_DEBUG, then I can always pass > -O0 or -O<whatever> in DEBUG_FLAGS. But there is no way for me to say leave > CFLAGS alone. > > Besides, the quoted logic seems to be incomplete with respect to CXXFLAGS. > I think that the CFLAGS line should be changed simply to: > > CFLAGS+= ${DEBUG_FLAGS}
I agree, and I even had the above in my bsd.port.mk for at least a year now. :-) -Dimitry
signature.asc
Description: Message signed with OpenPGP using GPGMail