From 30c99b8f08810bb9a14c88907a0cb0f83e82717d Mon Sep 17 00:00:00 2001 From: tnn Date: Tue, 7 Apr 2015 22:05:36 +0000 Subject: 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. --- lang/clang/Makefile | 4 +++- lang/clang/Makefile.common | 11 ++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'lang/clang') 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 -- cgit v1.2.3