From owner-svn-src-user@freebsd.org Tue Apr 9 07:36:41 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 4F37C1577945 for ; Tue, 9 Apr 2019 07:36:41 +0000 (UTC) (envelope-from pho@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 E593380272; Tue, 9 Apr 2019 07:36:40 +0000 (UTC) (envelope-from pho@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 C16F87DB4; Tue, 9 Apr 2019 07:36:40 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x397ae8F069597; Tue, 9 Apr 2019 07:36:40 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x397aetu069596; Tue, 9 Apr 2019 07:36:40 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201904090736.x397aetu069596@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Tue, 9 Apr 2019 07:36:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r346047 - user/pho/stress2/misc X-SVN-Group: user X-SVN-Commit-Author: pho X-SVN-Commit-Paths: user/pho/stress2/misc X-SVN-Commit-Revision: 346047 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E593380272 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.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] 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: Tue, 09 Apr 2019 07:36:41 -0000 Author: pho Date: Tue Apr 9 07:36:40 2019 New Revision: 346047 URL: https://svnweb.freebsd.org/changeset/base/346047 Log: Added a msdosfs regression test. PR: 236977 Sponsored by: Dell EMC Isilon Added: user/pho/stress2/misc/truncate8.sh (contents, props changed) Added: user/pho/stress2/misc/truncate8.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/pho/stress2/misc/truncate8.sh Tue Apr 9 07:36:40 2019 (r346047) @@ -0,0 +1,214 @@ +#!/bin/sh + +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2019 Dell EMC Isilon +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# Bug 236977 - [msdosfs] returns cached truncated data +# Fixed by r345847 + +. ../default.cfg +[ `id -u` -ne 0 ] && echo "Must be root!" && exit 1 + +dir=/tmp +odir=`pwd` +cd $dir +sed '1,/^EOF/d' < $odir/$0 > $dir/truncate8.c +mycc -o truncate8 -Wall -Wextra -O0 -g truncate8.c || exit 1 +rm -f truncate8.c +cd $odir + +echo ufs: +mount | grep -q "$mntpoint " && umount $mntpoint +mdconfig -l | grep -q $mdstart && mdconfig -d -u $mdstart +mdconfig -a -t swap -s 1g -u $mdstart +bsdlabel -w md$mdstart auto +newfs $newfs_flags md${mdstart}$part > /dev/null +mount /dev/md${mdstart}$part $mntpoint + +(cd $mntpoint; /tmp/truncate8) +s=$? +[ $s -ne 0 ] && { echo "UFS exit status is $s"; status=1; } +while mount | grep -q "$mntpoint "; do + umount $mntpoint || sleep 1 +done +mdconfig -d -u $mdstart + +echo nfs: +if ping -c 2 `echo $nfs_export | sed 's/:.*//'` > /dev/null 2>&1; then + mount -t nfs -o tcp -o retrycnt=3 -o intr,soft -o rw $nfs_export \ + $mntpoint + sleep .2 + (cd $mntpoint; /tmp/truncate8) + s=$? + [ $s -ne 0 ] && { echo "NFS exit status is $s"; status=1; } + + umount $mntpoint || umount $mntpoint +fi + +echo msdos: +if [ -x /sbin/mount_msdosfs ]; then + mdconfig -a -t swap -s 1g -u $mdstart + bsdlabel -w md$mdstart auto + newfs_msdos -F 16 -b 8192 /dev/md${mdstart}$part > /dev/null 2>&1 + mount_msdosfs -m 777 /dev/md${mdstart}$part $mntpoint + + (cd /mnt; /tmp/truncate8) + s=$? + [ $s -ne 0 ] && { echo "MSDOS exit status is $s"; status=1; } + while mount | grep -q "$mntpoint "; do + umount $mntpoint || sleep 1 + done + mdconfig -d -u $mdstart +fi + +echo tmpfs: +mount -t tmpfs null $mntpoint +chmod 777 $mntpoint + +(cd $mntpoint; /tmp/truncate8) +s=$? +[ $s -ne 0 ] && { echo "TMPFS exit status is $s"; status=1; } +while mount | grep -q "$mntpoint "; do + umount $mntpoint || sleep 1 +done + +rm -rf /tmp/truncate8 +exit $status + +EOF +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include + +static volatile u_int *share; + +#define BSIZE 5120 +#define FSIZE (128 * 1024 * 1024) +#define PARALLEL 2 +#define RUNTIME (1 * 60) +#define SYNC 0 + +static void +test(void) +{ + time_t start; + off_t pos; + int fd, i, n, r; + char *buf, name[128]; + + atomic_add_int(&share[SYNC], 1); + while (share[SYNC] != PARALLEL) + ; + + srand48(getpid()); + buf = malloc(BSIZE); + for (i = 0; i < (int)sizeof(buf); i++) + buf[i] = 123; + + sprintf(name, "f%05d", getpid()); + if ((fd = open(name, O_RDWR | O_CREAT, 0640)) == -1) + err(1, "%s", name); + for (i = 0; i < FSIZE / BSIZE; i++) + if (write(fd, buf, BSIZE) != BSIZE) + err(1, "write"); + + start = time(NULL); + while (time(NULL) - start < RUNTIME) { + pos = lrand48() % (FSIZE - BSIZE); +// fprintf(stderr, "truncate(%jd)\n", (intmax_t)pos); + if (ftruncate(fd, pos) == -1) + err(1, "ftruncate"); + + if (ftruncate(fd, FSIZE) == -1) + err(1, "ftruncate"); + if (lseek(fd, pos, SEEK_SET) == -1) + err(1, "lseek"); + n = 0; + while ((r = read(fd, buf, BSIZE)) == BSIZE) { + n++; + for (i = 0; i < BSIZE; i++) { + if (buf[i] != 0) + errx(1, "Bad read value @ %jd = %d", + (intmax_t)(pos + i), buf[i]); + } + } + if (r == -1) + err(1, "read"); + if (n != (FSIZE - pos) / BSIZE) + fprintf(stderr, "n = %d, target = %d\n", n, (int)(FSIZE - pos) / BSIZE); + } + unlink(name); + + _exit(0); +} + +int +main(void) +{ + pid_t pids[PARALLEL]; + size_t len; + int e, i, status; + + e = 0; + len = PAGE_SIZE; + if ((share = mmap(NULL, len, PROT_READ | PROT_WRITE, + MAP_ANON | MAP_SHARED, -1, 0)) == MAP_FAILED) + err(1, "mmap"); + + for (i = 0; i < PARALLEL; i++) { + if ((pids[i] = fork()) == 0) + test(); + if (pids[i] == -1) + err(1, "fork()"); + } + for (i = 0; i < PARALLEL; i++) { + if (waitpid(pids[i], &status, 0) == -1) + err(1, "waitpid(%d)", pids[i]); + if (status != 0) { + if (WIFSIGNALED(status)) + fprintf(stderr, + "pid %d exit signal %d\n", + pids[i], WTERMSIG(status)); + } + e += status == 0 ? 0 : 1; + } + + return (e); +} From owner-svn-src-user@freebsd.org Wed Apr 10 21:29:38 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 972BD156DB05 for ; Wed, 10 Apr 2019 21:29:38 +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 3A4FE8C160; Wed, 10 Apr 2019 21:29:38 +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 EAD1355F; Wed, 10 Apr 2019 21:29:37 +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 x3ALTb2t078807; Wed, 10 Apr 2019 21:29:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3ALTbub078806; Wed, 10 Apr 2019 21:29:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201904102129.x3ALTbub078806@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Wed, 10 Apr 2019 21:29:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r346102 - user/ngie/fix-up-cxxstd X-SVN-Group: user X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: user/ngie/fix-up-cxxstd X-SVN-Commit-Revision: 346102 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3A4FE8C160 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; 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: Wed, 10 Apr 2019 21:29:38 -0000 Author: ngie Date: Wed Apr 10 21:29:37 2019 New Revision: 346102 URL: https://svnweb.freebsd.org/changeset/base/346102 Log: Create a temporary branch for testing out jbeich's refinement of r345708 Added: - copied from r346101, head/ Directory Properties: user/ngie/fix-up-cxxstd/ (props changed) From owner-svn-src-user@freebsd.org Wed Apr 10 22:16:53 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 8EEC3156F6A1 for ; Wed, 10 Apr 2019 22:16:53 +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 337868E8CE; Wed, 10 Apr 2019 22:16:53 +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 07F88DCF; Wed, 10 Apr 2019 22:16:53 +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 x3AMGqGH005912; Wed, 10 Apr 2019 22:16:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3AMGp7e005901; Wed, 10 Apr 2019 22:16:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201904102216.x3AMGp7e005901@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Wed, 10 Apr 2019 22:16:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r346107 - in user/ngie/fix-up-cxxstd: lib/libc++ lib/libc++experimental lib/libc++fs lib/libcxxrt lib/libgcc_eh lib/ofed/libibnetdisc share/mk usr.bin/dtc X-SVN-Group: user X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in user/ngie/fix-up-cxxstd: lib/libc++ lib/libc++experimental lib/libc++fs lib/libcxxrt lib/libgcc_eh lib/ofed/libibnetdisc share/mk usr.bin/dtc X-SVN-Commit-Revision: 346107 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 337868E8CE 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_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] 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: Wed, 10 Apr 2019 22:16:53 -0000 Author: ngie Date: Wed Apr 10 22:16:50 2019 New Revision: 346107 URL: https://svnweb.freebsd.org/changeset/base/346107 Log: Set the C++ standard in a manner similar to how it was set, pre-r345708 Some cases overrode -std if specified; some cases would be overridden if specified. Be bug compatible. Modified: user/ngie/fix-up-cxxstd/lib/libc++/Makefile user/ngie/fix-up-cxxstd/lib/libc++experimental/Makefile user/ngie/fix-up-cxxstd/lib/libc++fs/Makefile user/ngie/fix-up-cxxstd/lib/libcxxrt/Makefile user/ngie/fix-up-cxxstd/lib/libgcc_eh/Makefile.inc user/ngie/fix-up-cxxstd/lib/ofed/libibnetdisc/Makefile user/ngie/fix-up-cxxstd/share/mk/googletest.test.inc.mk user/ngie/fix-up-cxxstd/usr.bin/dtc/Makefile Modified: user/ngie/fix-up-cxxstd/lib/libc++/Makefile ============================================================================== --- user/ngie/fix-up-cxxstd/lib/libc++/Makefile Wed Apr 10 21:46:59 2019 (r346106) +++ user/ngie/fix-up-cxxstd/lib/libc++/Makefile Wed Apr 10 22:16:50 2019 (r346107) @@ -76,7 +76,7 @@ CFLAGS+= -nostdinc++ CFLAGS+= -nostdlib CFLAGS+= -D_LIBCPP_BUILDING_LIBRARY CFLAGS+= -DLIBCXXRT -CXXSTD= c++11 +CXXSTD?= c++11 LIBADD+= cxxrt INCSGROUPS= STD EXP EXT Modified: user/ngie/fix-up-cxxstd/lib/libc++experimental/Makefile ============================================================================== --- user/ngie/fix-up-cxxstd/lib/libc++experimental/Makefile Wed Apr 10 21:46:59 2019 (r346106) +++ user/ngie/fix-up-cxxstd/lib/libc++experimental/Makefile Wed Apr 10 22:16:50 2019 (r346107) @@ -20,6 +20,6 @@ CXXFLAGS+= -nostdinc++ CXXFLAGS+= -nostdlib CXXFLAGS+= -D_LIBCPP_BUILDING_LIBRARY CXXFLAGS+= -DLIBCXXRT -CXXSTD= c++14 +CXXSTD?= c++14 .include Modified: user/ngie/fix-up-cxxstd/lib/libc++fs/Makefile ============================================================================== --- user/ngie/fix-up-cxxstd/lib/libc++fs/Makefile Wed Apr 10 21:46:59 2019 (r346106) +++ user/ngie/fix-up-cxxstd/lib/libc++fs/Makefile Wed Apr 10 22:16:50 2019 (r346107) @@ -22,6 +22,6 @@ CXXFLAGS+= -nostdinc++ CXXFLAGS+= -nostdlib CXXFLAGS+= -D_LIBCPP_BUILDING_LIBRARY CXXFLAGS+= -DLIBCXXRT -CXXSTD= c++14 +CXXSTD?= c++14 .include Modified: user/ngie/fix-up-cxxstd/lib/libcxxrt/Makefile ============================================================================== --- user/ngie/fix-up-cxxstd/lib/libcxxrt/Makefile Wed Apr 10 21:46:59 2019 (r346106) +++ user/ngie/fix-up-cxxstd/lib/libcxxrt/Makefile Wed Apr 10 22:16:50 2019 (r346107) @@ -22,7 +22,7 @@ SRCS+= libelftc_dem_gnu3.c\ WARNS= 0 CFLAGS+= -isystem ${SRCDIR} -nostdinc++ -CXXSTD= c++11 +CXXSTD?= c++11 VERSION_MAP= ${.CURDIR}/Version.map .include Modified: user/ngie/fix-up-cxxstd/lib/libgcc_eh/Makefile.inc ============================================================================== --- user/ngie/fix-up-cxxstd/lib/libgcc_eh/Makefile.inc Wed Apr 10 21:46:59 2019 (r346106) +++ user/ngie/fix-up-cxxstd/lib/libgcc_eh/Makefile.inc Wed Apr 10 22:16:50 2019 (r346107) @@ -28,7 +28,7 @@ CXXFLAGS.${file}+= -fno-exceptions -funwind-tables CFLAGS+= -I${UNWINDINCDIR} -I${.CURDIR} -D_LIBUNWIND_IS_NATIVE_ONLY CXXFLAGS+= -fno-rtti -CXXSTD= c++11 +CXXSTD?= c++11 STATIC_CXXFLAGS+= -fvisibility=hidden -fPIC # Probably need to just move this earlier or use CXXFLAGS .if ${MK_DIRDEPS_BUILD} == "yes" Modified: user/ngie/fix-up-cxxstd/lib/ofed/libibnetdisc/Makefile ============================================================================== --- user/ngie/fix-up-cxxstd/lib/ofed/libibnetdisc/Makefile Wed Apr 10 21:46:59 2019 (r346106) +++ user/ngie/fix-up-cxxstd/lib/ofed/libibnetdisc/Makefile Wed Apr 10 22:16:50 2019 (r346107) @@ -31,6 +31,9 @@ LIBADD= osmcomp ibmad ibumad CFLAGS+= -DHAVE_CONFIG_H=1 CFLAGS+= -I${_spath} CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/infiniband +.if ${COMPILER_FEATURES:Mc++11} +CXXSTD= c++11 +.endif VERSION_MAP= ${_spath}/libibnetdisc.map .include Modified: user/ngie/fix-up-cxxstd/share/mk/googletest.test.inc.mk ============================================================================== --- user/ngie/fix-up-cxxstd/share/mk/googletest.test.inc.mk Wed Apr 10 21:46:59 2019 (r346106) +++ user/ngie/fix-up-cxxstd/share/mk/googletest.test.inc.mk Wed Apr 10 22:16:50 2019 (r346107) @@ -9,4 +9,6 @@ GTESTS_CXXFLAGS+= -frtti # libgmock's, etc, headers. CXXFLAGS+= -I${DESTDIR}${INCLUDEDIR}/private +CXXSTD?= c++11 + NO_WTHREAD_SAFETY= Modified: user/ngie/fix-up-cxxstd/usr.bin/dtc/Makefile ============================================================================== --- user/ngie/fix-up-cxxstd/usr.bin/dtc/Makefile Wed Apr 10 21:46:59 2019 (r346106) +++ user/ngie/fix-up-cxxstd/usr.bin/dtc/Makefile Wed Apr 10 22:16:50 2019 (r346107) @@ -8,6 +8,8 @@ WARNS?= 3 CXXFLAGS+= -fno-rtti -fno-exceptions +CXXSTD= c++11 + NO_SHARED?=NO .include From owner-svn-src-user@freebsd.org Wed Apr 10 22:19:48 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 8DE08156F712 for ; Wed, 10 Apr 2019 22:19:48 +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 329B68EA12; Wed, 10 Apr 2019 22:19:48 +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 0A30BDD2; Wed, 10 Apr 2019 22:19:48 +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 x3AMJlpc006059; Wed, 10 Apr 2019 22:19:47 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3AMJlRu006058; Wed, 10 Apr 2019 22:19:47 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201904102219.x3AMJlRu006058@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Wed, 10 Apr 2019 22:19:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r346108 - 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: 346108 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 329B68EA12 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.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] 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: Wed, 10 Apr 2019 22:19:48 -0000 Author: ngie Date: Wed Apr 10 22:19:47 2019 New Revision: 346108 URL: https://svnweb.freebsd.org/changeset/base/346108 Log: Rework r345708 * Default to gnu++14 with clang++ and g++ 6.x+ according to the defaults of each compile toolchain. * Do not override user-specified values for `-std=*`. Some ports rely on this functionality. This patch is similar to the one submitted by jbeich, however, it aims to optimize the latter case by not testing the compiler version, etc, at all. Reported by: jbeich 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 Wed Apr 10 22:16:50 2019 (r346107) +++ user/ngie/fix-up-cxxstd/share/mk/bsd.sys.mk Wed Apr 10 22:19:47 2019 (r346108) @@ -25,16 +25,21 @@ CFLAGS+= -std=iso9899:1999 CFLAGS+= -std=${CSTD} .endif # CSTD -.if ${COMPILER_FEATURES:Mc++11} -CXXSTD?= c++11 -.elif ${COMPILER_TYPE} == "gcc" +# 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 +.else # Prior versions of g++ support C++98 with GNU extensions by default. CXXSTD?= gnu++98 -.else +.endif +.endif # Assume that the compiler supports at least C++98. CXXSTD?= c++98 -.endif CXXFLAGS+= -std=${CXXSTD} +.endif # CXXSTD # -pedantic is problematic because it also imposes namespace restrictions From owner-svn-src-user@freebsd.org Wed Apr 10 22:27: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 36ED4156F924 for ; Wed, 10 Apr 2019 22:27: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 F19678EE65; Wed, 10 Apr 2019 22:27:00 +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 50854F8D; Wed, 10 Apr 2019 22:27:00 +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 x3AMR0Sq010925; Wed, 10 Apr 2019 22:27:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3AMR0Ei010924; Wed, 10 Apr 2019 22:27:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201904102227.x3AMR0Ei010924@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Wed, 10 Apr 2019 22:27:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r346109 - 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: 346109 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F19678EE65 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.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] 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: Wed, 10 Apr 2019 22:27:02 -0000 Author: ngie Date: Wed Apr 10 22:26:59 2019 New Revision: 346109 URL: https://svnweb.freebsd.org/changeset/base/346109 Log: Clarify a comment w.r.t. -std=g++98 and clang++ < 6.x While here, simplify a conditional 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 Wed Apr 10 22:19:47 2019 (r346108) +++ user/ngie/fix-up-cxxstd/share/mk/bsd.sys.mk Wed Apr 10 22:26:59 2019 (r346109) @@ -31,10 +31,9 @@ CFLAGS+= -std=${CSTD} .if ${COMPILER_TYPE} == "clang" || ${COMPILER_TYPE} == "gcc" .if ${COMPILER_VERSION} >= 60000 CXXSTD?= gnu++14 -.else -# Prior versions of g++ support C++98 with GNU extensions by default. -CXXSTD?= gnu++98 .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 From owner-svn-src-user@freebsd.org Thu Apr 11 18:03:50 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 CBD4D15652C6 for ; Thu, 11 Apr 2019 18:03:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6E03870D09; Thu, 11 Apr 2019 18:03:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id F18FC3275; Thu, 11 Apr 2019 18:03:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r346108 - user/ngie/fix-up-cxxstd/share/mk To: Enji Cooper , src-committers@freebsd.org, svn-src-user@freebsd.org References: <201904102219.x3AMJlRu006058@repo.freebsd.org> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Thu, 11 Apr 2019 11:03:48 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <201904102219.x3AMJlRu006058@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 6E03870D09 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.991,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: Thu, 11 Apr 2019 18:03:51 -0000 On 4/10/19 3:19 PM, Enji Cooper wrote: > Author: ngie > Date: Wed Apr 10 22:19:47 2019 > New Revision: 346108 > URL: https://svnweb.freebsd.org/changeset/base/346108 > > Log: > Rework r345708 > > * Default to gnu++14 with clang++ and g++ 6.x+ according to the defaults of > each compile toolchain. > * Do not override user-specified values for `-std=*`. Some ports rely on this > functionality. > > This patch is similar to the one submitted by jbeich, however, it aims to > optimize the latter case by not testing the compiler version, etc, at all. > > Reported by: jbeich One thing I don't understand is why we'd set the value to the default value. If we want to use the compiler's default it seems like we should just not set the flag at all. Trying to keep the list in sync across compiler versions seems fragile. If, OTOH, we want to ensure that FreeBSD only uses C++11 so that in theory any C++11 compiler can compile it, then forcing C++11 even on newer compilers as the original change did would seem to make sense (and seems to be a legitimate reason to force -std). However, trying to just match the compiler's default seems to be a giant NOP, but one that requires ongoing maintenance. Can you describe the goal of what the -std changes are trying to do? -- John Baldwin 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