Date: Tue, 14 Jul 2015 20:32:15 +0000 (UTC) From: Brad Davis <brd@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r392084 - head/Mk/Uses Message-ID: <201507142032.t6EKWFQ5032222@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: brd Date: Tue Jul 14 20:32:14 2015 New Revision: 392084 URL: https://svnweb.freebsd.org/changeset/ports/392084 Log: Add support for USES= compiler:c++14 PR: 201076 Approved by: bapt, bdrewery (mentor) Modified: head/Mk/Uses/compiler.mk Modified: head/Mk/Uses/compiler.mk ============================================================================== --- head/Mk/Uses/compiler.mk Tue Jul 14 20:31:45 2015 (r392083) +++ head/Mk/Uses/compiler.mk Tue Jul 14 20:32:14 2015 (r392084) @@ -8,6 +8,7 @@ # # c++0x: The port needs a compiler understanding C++0X # c++11-lang: The port needs a compiler understanding C++11 +# c++14-lang: The port needs a compiler understanding C++14 # gcc-c++11-lib:The port needs g++ compiler with a C++11 library # c++11-lib: The port needs a compiler understanding C++11 and with a C++11 ready standard library # c11: The port needs a compiler understanding C11 @@ -34,7 +35,7 @@ _INCLUDE_USES_COMPILER_MK= yes compiler_ARGS= env .endif -VALID_ARGS= c++11-lib c++11-lang c11 features openmp env nestedfct c++0x gcc-c++11-lib +VALID_ARGS= c++11-lib c++11-lang c++14-lang c11 features openmp env nestedfct c++0x gcc-c++11-lib .if ${compiler_ARGS} == gcc-c++11-lib _COMPILER_ARGS+= features gcc-c++11-lib @@ -44,6 +45,8 @@ _COMPILER_ARGS+= features c++11-lib _COMPILER_ARGS+= features c++0x .elif ${compiler_ARGS} == c++11-lang _COMPILER_ARGS+= features c++11-lang +.elif ${compiler_ARGS} == c++14-lang +_COMPILER_ARGS+= features c++14-lang .elif ${compiler_ARGS} == c11 _COMPILER_ARGS+= features c11 .elif ${compiler_ARGS} == features @@ -114,7 +117,7 @@ COMPILER_FEATURES= libstdc++ .endif CSTD= c89 c99 c11 gnu89 gnu99 gnu11 -CXXSTD= c++98 c++11 gnu++98 gnu++11 c++0x +CXXSTD= c++98 c++0x c++11 c++14 gnu++98 gnu++11 .for std in ${CSTD} ${CXXSTD} _LANG=c @@ -138,6 +141,32 @@ CHOSEN_COMPILER_TYPE= gcc .endif .endif +.if ${_COMPILER_ARGS:Mc++14-lang} +.if !${COMPILER_FEATURES:Mc++14} +.if (defined(FAVORITE_COMPILER) && ${FAVORITE_COMPILER} == gcc) || (${ARCH} != amd64 && ${ARCH} != i386) # clang not always supported on Tier-2 +USE_GCC= 5+ +CHOSEN_COMPILER_TYPE= gcc +.elif (${COMPILER_TYPE} == clang && ${COMPILER_VERSION} < 35) || ${COMPILER_TYPE} == gcc +.if ${ALT_COMPILER_TYPE} == clang && ${ALT_COMPILER_VERSION} >= 35 +CPP= clang-cpp +CC= clang +CXX= clang++ +CHOSEN_COMPILER_TYPE= clang +.else +BUILD_DEPENDS+= ${LOCALBASE}/bin/clang35:${PORTSDIR}/lang/clang35 +CPP= ${LOCALBASE}/bin/clang-cpp35 +CC= ${LOCALBASE}/bin/clang35 +CXX= ${LOCALBASE}/bin/clang++35 +CHOSEN_COMPILER_TYPE= clang +.if ${OSVERSION} < 900033 +USE_BINUTILS= yes +LDFLAGS+= -B${LOCALBASE}/bin +.endif +.endif +.endif +.endif +.endif + .if ${_COMPILER_ARGS:Mc++11-lang} .if !${COMPILER_FEATURES:Mc++11} .if (defined(FAVORITE_COMPILER) && ${FAVORITE_COMPILER} == gcc) || (${ARCH} != amd64 && ${ARCH} != i386) # clang not always supported on Tier-2
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507142032.t6EKWFQ5032222>