From owner-svn-src-all@FreeBSD.ORG Mon Sep 9 21:18:17 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 36974AF4; Mon, 9 Sep 2013 21:18:17 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 245E724E6; Mon, 9 Sep 2013 21:18:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r89LIH3S027122; Mon, 9 Sep 2013 21:18:17 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r89LIG2G027121; Mon, 9 Sep 2013 21:18:16 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309092118.r89LIG2G027121@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Mon, 9 Sep 2013 21:18:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255431 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2013 21:18:17 -0000 Author: des Date: Mon Sep 9 21:18:16 2013 New Revision: 255431 URL: http://svnweb.freebsd.org/changeset/base/255431 Log: 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) Modified: head/share/mk/bsd.prog.mk Modified: head/share/mk/bsd.prog.mk ============================================================================== --- head/share/mk/bsd.prog.mk Mon Sep 9 21:05:01 2013 (r255430) +++ head/share/mk/bsd.prog.mk Mon Sep 9 21:18:16 2013 (r255431) @@ -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}