diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index fae8366f24a7..3c306eb75fe8 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -126,10 +126,14 @@ _EXTRADEPEND: .else echo ${PROG}: ${LIBC} ${DPADD} >> ${DEPENDFILE} .if defined(PROG_CXX) +.if !empty(CXXFLAGS:M-stdlib=libc++) + echo ${PROG}: ${LIBCPLUSPLUS} >> ${DEPENDFILE} +.else echo ${PROG}: ${LIBSTDCPLUSPLUS} >> ${DEPENDFILE} .endif .endif .endif +.endif .if !target(install)