Emit the correct standard library dependency line for C++ programs. In

the CLANG_IS_CC case, the default is now libc++.  Only use libstdc++ if
!CLANG_IS_CC or it was explicitly requested in CXXFLAGS.

Submitted by:	theraven
Approved by:	re (gjb)
This commit is contained in:
Dag-Erling Smørgrav 2013-09-09 21:18:16 +00:00
parent b10eed4081
commit 30d663c74e

View File

@ -173,7 +173,7 @@ _EXTRADEPEND:
.else
echo ${PROG}: ${LIBC} ${DPADD} >> ${DEPENDFILE}
.if defined(PROG_CXX)
.if !empty(CXXFLAGS:M-stdlib=libc++)
.if ${MK_CLANG_IS_CC} != "no" && empty(CXXFLAGS:M-stdlib=libstdc++)
echo ${PROG}: ${LIBCPLUSPLUS} >> ${DEPENDFILE}
.else
echo ${PROG}: ${LIBSTDCPLUSPLUS} >> ${DEPENDFILE}