summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorkamil <kamil@pkgsrc.org>2017-06-10 11:32:32 +0000
committerkamil <kamil@pkgsrc.org>2017-06-10 11:32:32 +0000
commit069a6d9489240193be5ba6dc3e6b992fc73afa47 (patch)
tree3b55f0e09bd527a1641f48f316b05356d7be784b /mk
parentee469ec60e614d03e243490f73055c70695d2bae (diff)
downloadpkgsrc-069a6d9489240193be5ba6dc3e6b992fc73afa47.tar.gz
Restore c++ support in ccache.mk
The ccache.mk file was checking for languages "c" and "c++". New framework for C++ dialects (or revisions) was setting implicitly c++, translating e.g. c++11 to c++. compiler.mk set this c++ after including ccache.mk, so c++ was undefined and ccache was ignored. This helps to build large projects like LLVM+Clang+LLDB with ccache. Sponsored by <The NetBSD Foundation>
Diffstat (limited to 'mk')
-rw-r--r--mk/compiler.mk9
1 files changed, 7 insertions, 2 deletions
diff --git a/mk/compiler.mk b/mk/compiler.mk
index 95c5b69f944..b65cb93375e 100644
--- a/mk/compiler.mk
+++ b/mk/compiler.mk
@@ -1,4 +1,4 @@
-# $NetBSD: compiler.mk,v 1.85 2017/05/18 08:14:08 jperkin Exp $
+# $NetBSD: compiler.mk,v 1.86 2017/06/10 11:32:32 kamil Exp $
#
# This Makefile fragment implements handling for supported C/C++/Fortran
# compilers.
@@ -78,6 +78,12 @@ USE_LANGUAGES?= c
USE_LANGUAGES+= c
.endif
+.for _version_ in gnu++14 c++14 gnu++11 c++11 gnu++0x c++0x
+. if !empty(USE_LANGUAGES:M${_version_})
+USE_LANGUAGES+= c++
+. endif
+.endfor
+
COMPILER_USE_SYMLINKS?= yes
_COMPILERS= ccc gcc icc ido mipspro mipspro-ucode \
@@ -168,7 +174,6 @@ ${_var_}:= ${${_var_}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//:T} ${${_var_}:C/^/_asdf_
_CXX_VERSION_REQD=
.for _version_ in gnu++14 c++14 gnu++11 c++11 gnu++0x c++0x
. if empty(_CXX_VERSION_REQD) && !empty(USE_LANGUAGES:M${_version_})
-USE_LANGUAGES+= c++
_CXX_VERSION_REQD= ${_version_}
_WRAP_EXTRA_ARGS.CXX+= -std=${_CXX_VERSION_REQD}
CWRAPPERS_PREPEND.cxx+= -std=${_CXX_VERSION_REQD}