Even though DEBUG was picked through CFLAGS by the port, do append to CXXFLAGS and LDFLAGS such that DEBUG ends in CXXFLAGS also iff set. Simply use the existing LINK.cc instead of rolling our own: $ make -p | grep ^LINK.cc LINK.cc = ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} OK stsp