Mongo is a c++ program, and the REINPLACE command was affecting the CCFLAGS variable, not the CFLAGS variable. In most cases, but not all, CXXFLAGS and CFLAGS have the same value though. Approved by: just fix it.