mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-12 07:27:57 +00:00
Add support for USES=compiler:c++17-lang
PR: 222415 Submitted by: Naram Qashat With hat: portmgr
This commit is contained in:
parent
4559e82ff4
commit
8ed8d2151d
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=472188
@ -9,6 +9,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
|
||||
# c++17-lang: The port needs a compiler understanding C++17
|
||||
# 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
|
||||
@ -35,7 +36,7 @@ _INCLUDE_USES_COMPILER_MK= yes
|
||||
compiler_ARGS= env
|
||||
.endif
|
||||
|
||||
VALID_ARGS= c++11-lib c++11-lang c++14-lang c11 features openmp env nestedfct c++0x gcc-c++11-lib
|
||||
VALID_ARGS= c++11-lib c++11-lang c++14-lang c++17-lang c11 features openmp env nestedfct c++0x gcc-c++11-lib
|
||||
|
||||
_CC_hash:= ${CC:hash}
|
||||
_CXX_hash:= ${CXX:hash}
|
||||
@ -50,6 +51,8 @@ _COMPILER_ARGS+= features c++0x
|
||||
_COMPILER_ARGS+= features c++11-lang
|
||||
.elif ${compiler_ARGS} == c++14-lang
|
||||
_COMPILER_ARGS+= features c++14-lang
|
||||
.elif ${compiler_ARGS} == c++17-lang
|
||||
_COMPILER_ARGS+= features c++17-lang
|
||||
.elif ${compiler_ARGS} == c11
|
||||
_COMPILER_ARGS+= features c11
|
||||
.elif ${compiler_ARGS} == features
|
||||
@ -138,7 +141,7 @@ COMPILER_FEATURES= libstdc++
|
||||
.endif
|
||||
|
||||
CSTD= c89 c99 c11 gnu89 gnu99 gnu11
|
||||
CXXSTD= c++98 c++0x c++11 c++14 gnu++98 gnu++11
|
||||
CXXSTD= c++98 c++0x c++11 c++14 c++17 gnu++98 gnu++11 gnu++14 gnu++17
|
||||
|
||||
.for std in ${CSTD} ${CXXSTD}
|
||||
_LANG=c
|
||||
@ -168,6 +171,28 @@ CHOSEN_COMPILER_TYPE= gcc
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if ${_COMPILER_ARGS:Mc++17-lang}
|
||||
.if !${COMPILER_FEATURES:Mc++17}
|
||||
.if (defined(FAVORITE_COMPILER) && ${FAVORITE_COMPILER} == gcc) || (${ARCH} != amd64 && ${ARCH} != i386) # clang not always supported on Tier-2
|
||||
USE_GCC= yes
|
||||
CHOSEN_COMPILER_TYPE= gcc
|
||||
.elif (${COMPILER_TYPE} == clang && ${COMPILER_VERSION} < 50) || ${COMPILER_TYPE} == gcc
|
||||
.if ${ALT_COMPILER_TYPE} == clang && ${ALT_COMPILER_VERSION} >= 50
|
||||
CPP= clang-cpp
|
||||
CC= clang
|
||||
CXX= clang++
|
||||
CHOSEN_COMPILER_TYPE= clang
|
||||
.else
|
||||
BUILD_DEPENDS+= ${LOCALBASE}/bin/clang60:devel/llvm60
|
||||
CPP= ${LOCALBASE}/bin/clang-cpp60
|
||||
CC= ${LOCALBASE}/bin/clang60
|
||||
CXX= ${LOCALBASE}/bin/clang++60
|
||||
CHOSEN_COMPILER_TYPE= clang
|
||||
.endif
|
||||
.endif
|
||||
.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
|
||||
|
Loading…
Reference in New Issue
Block a user