From 44acc1e156e6aca0958fbbc292d52a18d1eea245 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Thu, 12 Sep 2013 21:24:59 +0000 Subject: 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) --- gnu/lib/libsupc++/Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gnu/lib/libsupc++') diff --git a/gnu/lib/libsupc++/Makefile b/gnu/lib/libsupc++/Makefile index ee6c60114c8cd..630387ab151f5 100644 --- a/gnu/lib/libsupc++/Makefile +++ b/gnu/lib/libsupc++/Makefile @@ -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 -- cgit v1.3