Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Apr 2021 08:41:38 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 244810] Mk/Uses/compiler.mk: Please add compiler:c++20-lang
Message-ID:  <bug-244810-7788-ecSK2NACFE@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-244810-7788@https.bugs.freebsd.org/bugzilla/>
References:  <bug-244810-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D244810

--- Comment #2 from olevole@olevole.ru ---
I'm not sure that this is enough:

--
--- compiler.mk.orig    2021-04-09 12:39:56.641342000 +0300
+++ compiler.mk 2021-04-23 11:00:54.440261000 +0300
@@ -8,6 +8,7 @@
 # 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
+# c++20-lang:  The port needs a compiler understanding C++20
 # 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 @@
 compiler_ARGS=3D env
 .endif

-VALID_ARGS=3D    c++11-lib c++11-lang c++14-lang c++17-lang c11 features o=
penmp
env nestedfct c++0x gcc-c++11-lib
+VALID_ARGS=3D    c++11-lib c++11-lang c++14-lang c++17-lang c++20-lang c11
features openmp env nestedfct c++0x gcc-c++11-lib

 _CC_hash:=3D     ${CC:hash}
 _CXX_hash:=3D    ${CXX:hash}
@@ -51,6 +52,8 @@
 _COMPILER_ARGS+=3D       features c++14-lang
 .elif ${compiler_ARGS} =3D=3D c++17-lang
 _COMPILER_ARGS+=3D       features c++17-lang
+.elif ${compiler_ARGS} =3D=3D c++20-lang
+_COMPILER_ARGS+=3D       features c++20-lang
 .elif ${compiler_ARGS} =3D=3D c11
 _COMPILER_ARGS+=3D       features c11
 .elif ${compiler_ARGS} =3D=3D features
@@ -139,7 +142,7 @@
 .endif

 CSTD=3D  c89 c99 c11 gnu89 gnu99 gnu11
-CXXSTD=3D        c++98 c++0x c++11 c++14 c++17 gnu++98 gnu++11 gnu++14 gnu=
++17
+CXXSTD=3D        c++98 c++0x c++11 c++14 c++17 c++20 gnu++98 gnu++11 gnu++=
14
gnu++17

 .for std in ${CSTD} ${CXXSTD}
 _LANG=3Dc
@@ -169,7 +172,8 @@
 .endif
 .endif

-.if (${_COMPILER_ARGS:Mc++17-lang} && !${COMPILER_FEATURES:Mc++17}) || \
+.if (${_COMPILER_ARGS:Mc++20-lang} && !${COMPILER_FEATURES:Mc++20}) || \
+(${_COMPILER_ARGS:Mc++17-lang} && !${COMPILER_FEATURES:Mc++17}) || \
 (${_COMPILER_ARGS:Mc++14-lang} && !${COMPILER_FEATURES:Mc++14}) || \
 (${_COMPILER_ARGS:Mc++11-lang} && !${COMPILER_FEATURES:Mc++11}) || \
 (${_COMPILER_ARGS:Mc++0x} && !${COMPILER_FEATURES:Mc++0x}) || \
--


Perhaps we should additionally explicitly indicate the dependency on the ll=
vm
clang11 here, e.g.:
--
BUILD_DEPENDS+=3D ${LOCALBASE}/bin/clang11:devel/llvm11
CPP=3D    ${LOCALBASE}/bin/clang-cpp11
CC=3D     ${LOCALBASE}/bin/clang11
CXX=3D    ${LOCALBASE}/bin/clang++11
--

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-244810-7788-ecSK2NACFE>