From owner-svn-src-head@FreeBSD.ORG Thu Sep 12 21:25:00 2013 Return-Path: Delivered-To: svn-src-head@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 2F758ED5; Thu, 12 Sep 2013 21:25:00 +0000 (UTC) (envelope-from dim@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 1C8892885; Thu, 12 Sep 2013 21:25:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8CLOxhR025248; Thu, 12 Sep 2013 21:24:59 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8CLOxXl025246; Thu, 12 Sep 2013 21:24:59 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201309122124.r8CLOxXl025246@svn.freebsd.org> From: Dimitry Andric Date: Thu, 12 Sep 2013 21:24:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255500 - in head/gnu/lib: libstdc++ libsupc++ X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2013 21:25:00 -0000 Author: dim Date: Thu Sep 12 21:24:59 2013 New Revision: 255500 URL: http://svnweb.freebsd.org/changeset/base/255500 Log: After r255321, clang uses libc++ by default. This leads to a lot of errors when you enable WITH_GNUCXX to build libstdc++, since it will include C++ headers from the libc++ installation under ${WORLDTMP}, and those are not compatible with libstdc++ at all. To fix this, add -stdlib=libstdc++ to CXXFLAGS when building libstdc++ (and its companion libsupc++) with clang. Approved by: re (delphij) Modified: head/gnu/lib/libstdc++/Makefile head/gnu/lib/libsupc++/Makefile Modified: head/gnu/lib/libstdc++/Makefile ============================================================================== --- head/gnu/lib/libstdc++/Makefile Thu Sep 12 20:51:48 2013 (r255499) +++ head/gnu/lib/libstdc++/Makefile Thu Sep 12 21:24:59 2013 (r255500) @@ -636,3 +636,7 @@ CLEANFILES+= ${VERSION_MAP} # Filter out libc++-specific flags, and -std= flags above c++98 or gnu++98. CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]} + +.if ${COMPILER_TYPE} == "clang" +CXXFLAGS+= -stdlib=libstdc++ +.endif Modified: head/gnu/lib/libsupc++/Makefile ============================================================================== --- head/gnu/lib/libsupc++/Makefile Thu Sep 12 20:51:48 2013 (r255499) +++ head/gnu/lib/libsupc++/Makefile Thu Sep 12 21:24:59 2013 (r255500) @@ -56,3 +56,7 @@ VERSION_MAP= ${.CURDIR}/Version.map # Filter out libc++-specific flags, and -std= flags above c++98 or gnu++98. CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]} + +.if ${COMPILER_TYPE} == "clang" +CXXFLAGS+= -stdlib=libstdc++ +.endif