Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Sep 2013 21:24:59 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
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++
Message-ID:  <201309122124.r8CLOxXl025246@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309122124.r8CLOxXl025246>