svn commit: r346148 - user/ngie/fix-up-cxxstd/share/mk
Enji Cooper
ngie at FreeBSD.org
Fri Apr 12 05:43:03 UTC 2019
Author: ngie
Date: Fri Apr 12 05:43:01 2019
New Revision: 346148
URL: https://svnweb.freebsd.org/changeset/base/346148
Log:
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 bsd.sys.mk, 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 bsd.sys.mk for each
compiler.
Modified:
user/ngie/fix-up-cxxstd/share/mk/bsd.sys.mk
Modified: user/ngie/fix-up-cxxstd/share/mk/bsd.sys.mk
==============================================================================
--- user/ngie/fix-up-cxxstd/share/mk/bsd.sys.mk Fri Apr 12 02:27:03 2019 (r346147)
+++ user/ngie/fix-up-cxxstd/share/mk/bsd.sys.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
-.endif
-# Prior versions of clang++/g++ support C++98 with GNU extensions by default.
-CXXSTD?= gnu++98
-.endif
-# Assume that the compiler supports at least C++98.
-CXXSTD?= c++98
+.if !empty(CXXSTD)
CXXFLAGS+= -std=${CXXSTD}
.endif
-# CXXSTD
# -pedantic is problematic because it also imposes namespace restrictions
#CFLAGS+= -pedantic
More information about the svn-src-user
mailing list