Date: Fri, 12 Apr 2019 05:43:02 +0000 (UTC) From: Enji Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r346148 - user/ngie/fix-up-cxxstd/share/mk Message-ID: <201904120543.x3C5h2vC099230@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904120543.x3C5h2vC099230>