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}

-- 
Andriy Gapon
_______________________________________________
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Reply via email to