summaryrefslogtreecommitdiff
path: root/lang/clang
diff options
context:
space:
mode:
authortnn <tnn>2015-04-07 22:05:36 +0000
committertnn <tnn>2015-04-07 22:05:36 +0000
commitd6b57846b7902928d21878416a21160622936470 (patch)
tree28a77f9d2cb9825a2d444dbd2422f726f3681db9 /lang/clang
parentc5cd27a06496ec72509655c731f708107e573cdf (diff)
downloadpkgsrc-d6b57846b7902928d21878416a21160622936470.tar.gz
Unbreak C++ on NetBSD, by popular demand.
Background: LLVM 3.6 upstream added support for being a native toolchain on NetBSD. This changed the default C++ runtime library from libstdc++ to libc++. Patch this in pkgsrc's clang so we continue to use libstdc++ (for now) Proper support for libc++ should be added later (perhaps w/ PKG_OPTIONs). Thanks to Joerg for explaining the problem.
Diffstat (limited to 'lang/clang')
-rw-r--r--lang/clang/Makefile4
-rw-r--r--lang/clang/Makefile.common11
2 files changed, 13 insertions, 2 deletions
diff --git a/lang/clang/Makefile b/lang/clang/Makefile
index 28f17679590..47c9979882d 100644
--- a/lang/clang/Makefile
+++ b/lang/clang/Makefile
@@ -1,4 +1,6 @@
-# $NetBSD: Makefile,v 1.38 2015/03/04 13:57:42 tnn Exp $
+# $NetBSD: Makefile,v 1.39 2015/04/07 22:05:36 tnn Exp $
+
+PKGREVISION= 1
MAKE_DIRS= etc/llvm
INSTALLATION_DIRS= bin lib libexec
diff --git a/lang/clang/Makefile.common b/lang/clang/Makefile.common
index 14b620f2aa7..d0e6d10dc2f 100644
--- a/lang/clang/Makefile.common
+++ b/lang/clang/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.4 2015/03/22 16:07:59 tnn Exp $
+# $NetBSD: Makefile.common,v 1.5 2015/04/07 22:05:36 tnn Exp $
#
# used by lang/clang/Makefile
# used by lang/libLLVM/Makefile
@@ -84,6 +84,15 @@ SUBST_SED.fix-paths+= -e 's,^.*cxa_finalize.*$$, ; //cxa_finalize.o,g'
. endif
.endif
+# patch NetBSD::GetCXXStdlibType
+.if ${OPSYS} == "NetBSD" && !empty(PKGSRC_COMPILER:Mgcc)
+SUBST_CLASSES+= libcxx
+SUBST_STAGE.libcxx= pre-configure
+SUBST_MESSAGE.libcxx= Patching toolchain to use libstdc++ as we're using GCC
+SUBST_FILES.libcxx= tools/clang/lib/Driver/ToolChains.cpp
+SUBST_SED.libcxx= -e 's,Major >= 7 || (Major == 6 && Minor == 99 && Micro >= 49) || Major == 0,false,'
+.endif
+
post-extract:
mv ${WRKDIR}/libcxx-${PKGVERSION_NOREV}.src ${WRKSRC}/projects/libcxx
mv ${WRKDIR}/compiler-rt-${PKGVERSION_NOREV}.src ${WRKSRC}/projects/compiler-rt