svn commit: r346148 - user/ngie/fix-up-cxxstd/share/mk

Enji Cooper ngie at
Tue Sep 3 14:06:45 UTC 2019

Author: ngie
Date: Fri Apr 12 05:43:01 2019
New Revision: 346148

  Take a more relaxed approach to CXXSTD
  Only inject `-std=${CXXSTD}` if the value of CXXSTD is not empty.
  This satisfies the backwards compatibility of, pre-r345708, and the
  aim of CXXSTD in r345708, without having to hardcode nop values and build
  unnecessary intelligence of supported C++11 standards in for each


Modified: user/ngie/fix-up-cxxstd/share/mk/
--- user/ngie/fix-up-cxxstd/share/mk/	Fri Apr 12 02:27:03 2019	(r346147)
+++ user/ngie/fix-up-cxxstd/share/mk/	Fri Apr 12 05:43:01 2019	(r346148)
@@ -25,21 +25,9 @@ CFLAGS+=	-std=iso9899:1999
 CFLAGS+=	-std=${CSTD}
 .endif # CSTD
-# Only pass -std= if not specified to facilitate compatibility with previous
-# FreeBSD versions. Third-party packages might specify -std=*.
-.if empty(CXXFLAGS:M-std=*)
-.if ${COMPILER_TYPE} == "clang" || ${COMPILER_TYPE} == "gcc"
-.if ${COMPILER_VERSION} >= 60000
-CXXSTD?=	gnu++14
-# Prior versions of clang++/g++ support C++98 with GNU extensions by default.
-CXXSTD?=	gnu++98
-# Assume that the compiler supports at least C++98.
-CXXSTD?=	c++98
+.if !empty(CXXSTD)
 # -pedantic is problematic because it also imposes namespace restrictions
 #CFLAGS+=	-pedantic

More information about the svn-src-user mailing list