From owner-svn-src-user@freebsd.org Fri Apr 12 05:43:02 2019 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8D10157318E for ; Fri, 12 Apr 2019 05:43:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 78B468C597; Fri, 12 Apr 2019 05:43:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 532391D26C; Fri, 12 Apr 2019 05:43:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3C5h2db099231; Fri, 12 Apr 2019 05:43:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3C5h2vC099230; Fri, 12 Apr 2019 05:43:02 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201904120543.x3C5h2vC099230@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Fri, 12 Apr 2019 05:43:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r346148 - user/ngie/fix-up-cxxstd/share/mk X-SVN-Group: user X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: user/ngie/fix-up-cxxstd/share/mk X-SVN-Commit-Revision: 346148 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 78B468C597 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2019 05:43:03 -0000 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