From owner-svn-src-user@freebsd.org Tue Sep 3 14:06:45 2019 Return-Path: Delivered-To: svn-src-user@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9AF6CDCEC6 for ; Tue, 3 Sep 2019 14:06:45 +0000 (UTC) (envelope-from yuripv@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (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 "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46N7zn1gyGz4PsG; Tue, 3 Sep 2019 14:06:45 +0000 (UTC) (envelope-from yuripv@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1452) id 7F5861AB02; Tue, 3 Sep 2019 14:06:16 +0000 (UTC) X-Original-To: yuripv@localmail.freebsd.org Delivered-To: yuripv@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id 16691E70E; Fri, 12 Apr 2019 05:43:06 +0000 (UTC) (envelope-from owner-src-committers@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (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 "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 490998C5A3; Fri, 12 Apr 2019 05:43:05 +0000 (UTC) (envelope-from owner-src-committers@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 538) id 16BFFE6E3; Fri, 12 Apr 2019 05:43:05 +0000 (UTC) Delivered-To: src-committers@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id C7B08E6E1 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 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 Precedence: bulk X-Loop: FreeBSD.org Sender: owner-src-committers@freebsd.org X-Rspamd-Queue-Id: 490998C5A3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Status: O X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Tue, 03 Sep 2019 14:06:45 -0000 X-Original-Date: Fri, 12 Apr 2019 05:43:02 +0000 (UTC) X-List-Received-Date: Tue, 03 Sep 2019 14:06:45 -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