From owner-svn-src-all@freebsd.org Tue Sep 3 14:06:11 2019 Return-Path: Delivered-To: svn-src-all@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 CAE13DC0C9; Tue, 3 Sep 2019 14:05:57 +0000 (UTC) (envelope-from yuripv@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 46N7ys2mDZz4P1m; Tue, 3 Sep 2019 14:05:57 +0000 (UTC) (envelope-from yuripv@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1452) id 1E26919E65; Tue, 3 Sep 2019 14:05:52 +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 DE771124C9; Fri, 29 Mar 2019 18:49:13 +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 4DDAE73CD4; Fri, 29 Mar 2019 18:49:13 +0000 (UTC) (envelope-from owner-src-committers@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 538) id 19A541245E; Fri, 29 Mar 2019 18:49:13 +0000 (UTC) Delivered-To: src-committers@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 D5AFD1245C for ; Fri, 29 Mar 2019 18:49:09 +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 83CE973CCE; Fri, 29 Mar 2019 18:49:09 +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 5C5C52D3F; Fri, 29 Mar 2019 18:49:09 +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 x2TIn9H1088067; Fri, 29 Mar 2019 18:49:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2TIn8VR088066; Fri, 29 Mar 2019 18:49:08 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201903291849.x2TIn8VR088066@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-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345709 - in head: lib/libc/tests/stdlib share/mk X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in head: lib/libc/tests/stdlib share/mk X-SVN-Commit-Revision: 345709 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: 4DDAE73CD4 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.996,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,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-all@freebsd.org X-Mailman-Version: 2.1.29 List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Tue, 03 Sep 2019 14:06:12 -0000 X-Original-Date: Fri, 29 Mar 2019 18:49:08 +0000 (UTC) X-List-Received-Date: Tue, 03 Sep 2019 14:06:12 -0000 Author: ngie Date: Fri Mar 29 18:49:08 2019 New Revision: 345709 URL: https://svnweb.freebsd.org/changeset/base/345709 Log: Allow users to override CSTD/CXXSTD on a per-prog basis The current logic for CSTD/CXXSTD requires homogenity as far as the supported C/C++ standards, which is a sensible default. However, when dealing with differing versions of C++, some code may compile with C++11, but not C++17 (for instance). So in order to avoid having people convert over their code to the new standard, give the users the ability to specify the standard on a per-program basis. This will allow a user to override the supporting standard for a set of programs, mixing C++11 with C++14 (for instance). Reviewed by: asomers Apprved by: emaste (mentor) MFC after: 1 month MFC with: r345708 Differential Revision: https://reviews.freebsd.org/D19738 Modified: head/lib/libc/tests/stdlib/Makefile head/share/mk/bsd.progs.mk Modified: head/lib/libc/tests/stdlib/Makefile ============================================================================== --- head/lib/libc/tests/stdlib/Makefile Fri Mar 29 18:45:27 2019 (r345708) +++ head/lib/libc/tests/stdlib/Makefile Fri Mar 29 18:49:08 2019 (r345709) @@ -50,8 +50,8 @@ PROGS+= h_getopt h_getopt_long CFLAGS+= -I${.CURDIR} -CXXFLAGS.cxa_thread_atexit_test+= -std=c++11 -CXXFLAGS.cxa_thread_atexit_nothr_test+= -std=c++11 +CXXSTD.cxa_thread_atexit_test= c++11 +CXXSTD.cxa_thread_atexit_nothr_test= c++11 LIBADD.cxa_thread_atexit_test+= pthread .for t in h_getopt h_getopt_long Modified: head/share/mk/bsd.progs.mk ============================================================================== --- head/share/mk/bsd.progs.mk Fri Mar 29 18:45:27 2019 (r345708) +++ head/share/mk/bsd.progs.mk Fri Mar 29 18:49:08 2019 (r345709) @@ -22,8 +22,8 @@ PROGS += ${PROGS_CXX} .if defined(PROG) # just one of many -PROG_OVERRIDE_VARS += BINDIR BINGRP BINOWN BINMODE DPSRCS MAN NO_WERROR \ - PROGNAME SRCS STRIP WARNS +PROG_OVERRIDE_VARS += BINDIR BINGRP BINOWN BINMODE CSTD CXXSTD DPSRCS MAN \ + NO_WERROR PROGNAME SRCS STRIP WARNS PROG_VARS += CFLAGS CXXFLAGS DEBUG_FLAGS DPADD INTERNALPROG LDADD LIBADD \ LINKS LDFLAGS MLINKS ${PROG_OVERRIDE_VARS} .for v in ${PROG_VARS:O:u}