pkgsrc-WIP-changes archive

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

can't use PKG_CXX before the wrappers have been created



Module Name:	pkgsrc-wip
Committed By:	Tobias Nygren <tnn%NetBSD.org@localhost>
Pushed By:	tnn
Date:		Thu Mar 10 15:32:53 2016 +0100
Changeset:	0ca6201c8bc1e088b02a4d24648f66e26528a0a9

Modified Files:
	clang-git/Makefile.common
	clang/Makefile.common

Log Message:
can't use PKG_CXX before the wrappers have been created

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=0ca6201c8bc1e088b02a4d24648f66e26528a0a9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 clang-git/Makefile.common | 10 +++++++---
 clang/Makefile.common     | 10 +++++++---
 2 files changed, 14 insertions(+), 6 deletions(-)

diffs:
diff --git a/clang-git/Makefile.common b/clang-git/Makefile.common
index ff1fad3..67fc27a 100644
--- a/clang-git/Makefile.common
+++ b/clang-git/Makefile.common
@@ -66,11 +66,15 @@ REPLACE_PYTHON+=	www/builtins.py
 
 .include "../../mk/compiler.mk"
 
-# command to check if the PKG_CXX compiler is using libc++ or libstdc++
-LIBCPP_CHECK_SH=	printf "\#include <ciso646>\n\#ifdef _LIBCPP_VERSION\nYES\n\#endif" | ${PKG_CXX} -x c++ -E - | grep YES || true
+.if ${OPSYS} == "NetBSD" && !empty(PKGSRC_COMPILER:Mclang)
+# command to check if clang is using libc++ or libstdc++
+LIBCPP_CHECK_SH=	printf "\#include <ciso646>\n\#ifdef _LIBCPP_VERSION\nYES\n\#endif" | ${CLANGBASE}/bin/clang++ -x c++ -E - 2>&1 | grep YES || true
+.else
+LIBCPP_CHECK_SH=	echo NO
+.endif
 
 # patch NetBSD::GetCXXStdlibType
-.if ${OPSYS} == "NetBSD" && (!empty(PKGSRC_COMPILER:Mgcc) || empty(LIBCPP_CHECK_SH:sh:MYES))
+.if ${OPSYS} == "NetBSD" && empty(LIBCPP_CHECK_SH:sh:MYES)
 SUBST_CLASSES+=			libcxx
 SUBST_STAGE.libcxx=		pre-configure
 SUBST_MESSAGE.libcxx=		Patching toolchain to use libstdc++ (matching the host compiler)
diff --git a/clang/Makefile.common b/clang/Makefile.common
index c9f4273..748fe1d 100644
--- a/clang/Makefile.common
+++ b/clang/Makefile.common
@@ -66,11 +66,15 @@ REPLACE_PYTHON+=	www/builtins.py
 
 .include "../../mk/compiler.mk"
 
-# command to check if the PKG_CXX compiler is using libc++ or libstdc++
-LIBCPP_CHECK_SH=	printf "\#include <ciso646>\n\#ifdef _LIBCPP_VERSION\nYES\n\#endif" | ${PKG_CXX} -x c++ -E - | grep YES || true
+.if ${OPSYS} == "NetBSD" && !empty(PKGSRC_COMPILER:Mclang)
+# command to check if clang is using libc++ or libstdc++
+LIBCPP_CHECK_SH=	printf "\#include <ciso646>\n\#ifdef _LIBCPP_VERSION\nYES\n\#endif" | ${CLANGBASE}/bin/clang++ -x c++ -E - 2>&1 | grep YES || true
+.else
+LIBCPP_CHECK_SH=	echo NO
+.endif
 
 # patch NetBSD::GetCXXStdlibType
-.if ${OPSYS} == "NetBSD" && (!empty(PKGSRC_COMPILER:Mgcc) || empty(LIBCPP_CHECK_SH:sh:MYES))
+.if ${OPSYS} == "NetBSD" && empty(LIBCPP_CHECK_SH:sh:MYES)
 SUBST_CLASSES+=			libcxx
 SUBST_STAGE.libcxx=		pre-configure
 SUBST_MESSAGE.libcxx=		Patching toolchain to use libstdc++ (matching the host compiler)


Home | Main Index | Thread Index | Old Index