pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/clang Unbreak C++ on NetBSD, by popular demand.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/766a90cb8077
branches:  trunk
changeset: 649682:766a90cb8077
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Tue Apr 07 22:05:36 2015 +0000

description:
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:

 lang/clang/Makefile        |   4 +++-
 lang/clang/Makefile.common |  11 ++++++++++-
 2 files changed, 13 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r b8ab23602790 -r 766a90cb8077 lang/clang/Makefile
--- a/lang/clang/Makefile       Tue Apr 07 20:54:26 2015 +0000
+++ b/lang/clang/Makefile       Tue Apr 07 22:05:36 2015 +0000
@@ -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 -r b8ab23602790 -r 766a90cb8077 lang/clang/Makefile.common
--- a/lang/clang/Makefile.common        Tue Apr 07 20:54:26 2015 +0000
+++ b/lang/clang/Makefile.common        Tue Apr 07 22:05:36 2015 +0000
@@ -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 @@
 .  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



Home | Main Index | Thread Index | Old Index