From 063b380f54b04eaab8ee26e39d6e8128523d16ad Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 18 Nov 2022 20:11:59 -0800 Subject: [PATCH] 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