Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Sep 2019 18:23:00 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r351949 - stable/12/share/mk
Message-ID:  <201909061823.x86IN061025036@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: asomers
Date: Fri Sep  6 18:23:00 2019
New Revision: 351949
URL: https://svnweb.freebsd.org/changeset/base/351949

Log:
  MFC r350291:
  
  Add c++14 and c++17 to COMPILER_FEATURES
  
  This will be used to gate the fusefs tests. It's a partial merge of r348281
  from projects/fuse2.
  
  Reviewed by:	kib, emaste
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D21044

Modified:
  stable/12/share/mk/bsd.compiler.mk
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/share/mk/bsd.compiler.mk
==============================================================================
--- stable/12/share/mk/bsd.compiler.mk	Fri Sep  6 18:14:14 2019	(r351948)
+++ stable/12/share/mk/bsd.compiler.mk	Fri Sep  6 18:23:00 2019	(r351949)
@@ -19,6 +19,8 @@
 # COMPILER_FEATURES will contain one or more of the following, based on
 # compiler support for that feature:
 #
+# - c++17:     supports full (or nearly full) C++17 programming environment.
+# - c++14:     supports full (or nearly full) C++14 programming environment.
 # - c++11:     supports full (or nearly full) C++11 programming environment.
 # - retpoline: supports the retpoline speculative execution vulnerability
 #              mitigation.
@@ -181,9 +183,17 @@ ${X_}COMPILER_FREEBSD_VERSION=	unknown
 .endif
 
 ${X_}COMPILER_FEATURES=
-.if ${${X_}COMPILER_TYPE} == "clang" || \
+.if (${${X_}COMPILER_TYPE} == "clang" && ${${X_}COMPILER_VERSION} >= 30300) || \
 	(${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 40800)
 ${X_}COMPILER_FEATURES+=	c++11
+.endif
+.if (${${X_}COMPILER_TYPE} == "clang" && ${${X_}COMPILER_VERSION} >= 30400) || \
+	(${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 50000)
+${X_}COMPILER_FEATURES+=	c++14
+.endif
+.if (${${X_}COMPILER_TYPE} == "clang" && ${${X_}COMPILER_VERSION} >= 50000) || \
+	(${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 70000)
+${X_}COMPILER_FEATURES+=	c++17
 .endif
 .if ${${X_}COMPILER_TYPE} == "clang" && ${${X_}COMPILER_VERSION} >= 60000
 ${X_}COMPILER_FEATURES+=	retpoline



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909061823.x86IN061025036>