git: 063b380f54b0 - main - bsd.compiler.mk: Add a c++20 compiler feature.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Sat, 19 Nov 2022 04:13:11 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=063b380f54b04eaab8ee26e39d6e8128523d16ad

commit 063b380f54b04eaab8ee26e39d6e8128523d16ad
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-11-19 04:11:59 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-11-19 04:11:59 +0000

    bsd.compiler.mk: Add a c++20 compiler feature.
    
    This is enabled for clang versions 10+ and GCC versions 10+.
    
    Reviewed by:    imp
    Differential Revision:  https://reviews.freebsd.org/D36892
---
 share/mk/bsd.compiler.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/share/mk/bsd.compiler.mk b/share/mk/bsd.compiler.mk
index c8fb9e1ba4a8..e34c3c62a7e8 100644
--- a/share/mk/bsd.compiler.mk
+++ b/share/mk/bsd.compiler.mk
@@ -235,6 +235,10 @@ ${X_}COMPILER_FEATURES+=		c++11 c++14
 	(${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 70000)
 ${X_}COMPILER_FEATURES+=	c++17
 .endif
+.if (${${X_}COMPILER_TYPE} == "clang" && ${${X_}COMPILER_VERSION} >= 100000) || \
+	(${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 100100)
+${X_}COMPILER_FEATURES+=	c++20
+.endif
 .if ${${X_}COMPILER_TYPE} == "clang"
 ${X_}COMPILER_FEATURES+=	retpoline init-all
 # PR257638 lld fails with BE compressed debug.  Fixed in main but external tool