From nobody Mon Nov 23 05:49:24 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXw4N5z31z71ymT for ; Mon, 23 Nov 2026 05:49:24 +0000 (UTC) (envelope-from git@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) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXw4N32mYz4Sq9 for ; Mon, 23 Nov 2026 05:49:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795412964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i8O0b1ggj9UoNriVfYd1DW2+RuNiob+p6uqZjzbIEeU=; b=HSqf6p5iZXN/NaaGM2Pzjxve4B+SxpLT8d4zUDTNblyHxD5weEVJEo6LkNi6rD9EsLmNhB pjf1jhoubxzrHL0vgH1Qyv5zShFZSV8xu5upNpRqOAiCydKxkwSP2bl8TptqO6xcHbLmDE acreDwCxvnk1+apn9y09KVZfSvhsKBrscBQPMS08V4gKWBtlk9xI1c36utRdA2m4UBCUEO 66ChDfLU8lQcZYd7WEf3AxFipEMgHH45avjC/7VjQd8kqXxpF3EwaZ823NvhHofX6AvAR/ Tvq5IJVulJoH0RKxRhQxTAxdDgU/hB18Viva1Aa7JVTl9OHwTuFxRqPUBQb/+g== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795412964; b=mUOsRTf05QMzXYxwj06mkOCt1qRHf6By2XiSAZNIWHGt3WJ9I6JDWgYkVvl+wxk1MgwYEM Bw4FdmZmkugY6AZn7PGpSzPMW80RAjGIizglppK6CJ0PFdyF7c8EKIVngG+arqkxr0K184 1SmzpdOX7DN9w3LNCNv/xks4NEK/nV7ZhdWktvGydz61ZRbi93nr7l9/GYC75mbH1x2A9V UKIfmo6dbSl9gaANeGWYm0nkX6H+gZwBG9xmgXE2uZhNM8K5ZKkWvXtOA0LfNJjAcmWhGs GedZJ5rEE3nhgcRJ2tC14b98EMRWcNRmJx3fGNzgSgTToroPFjaLq/QWDV8sFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795412964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i8O0b1ggj9UoNriVfYd1DW2+RuNiob+p6uqZjzbIEeU=; b=x9VjIQ7SAbosG4HZ7Vg3oV7eGDfmGdehrOtk0B1n2pmXJQyjZGdjPNCPgn3Tksr8d0VVBt S+swv/TfPCCzV7PWfjwR57Unwb7JGyT2IOlqueXO23pgFK6j9AJ/eXjE7gTcksZUojYWXK 1j+fE5vK5iOAqC+yQd4T43jhK/mFRd5anfRpb5VskbuuFxJ4ltaTZZ3nZrvDPg4WI3d5Av sy6ERYz0+Uc0RzYhYnUgK2ZPwZr8gX1bVcK7yD0fiY2FvGdmtoqgw5VxCXHqQ/XUvxtq/e K/HnLDw2RsL0QnyqQsz9OkSAwHXuck/f4VihVkoYmFT+rWdrAQzLd9H30RmplA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXw4N2YxXzdwB for ; Mon, 23 Nov 2026 05:49:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1fcda by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 05:49:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: John Baldwin From: Enji Cooper Subject: git: 5e5687aac4e0 - stable/14 - src: Use gnu++17 as the default C++ standard List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5e5687aac4e069dc20fa8dc735c581c188534144 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 05:49:24 +0000 Message-Id: <6b03d3e4.1fcda.5b9b38f9@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=5e5687aac4e069dc20fa8dc735c581c188534144 commit 5e5687aac4e069dc20fa8dc735c581c188534144 Author: John Baldwin AuthorDate: 2025-04-11 13:53:50 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 05:44:04 +0000 src: Use gnu++17 as the default C++ standard Previously the compiler's default C++ standard was used unlike C where bsd.sys.mk explicitly sets a default language version. Setting an explicit default version will give a more uniform experience across different compilers and compiler versions. gnu++17 was chosen to match the default C standard. It is well supported by a wide range of clang (5+) and GCC (9+) versions. gnu++17 is also the default C++ standard in recent versions of clang (16+) and GCC (11+). As a result, many of the explicit CXXSTD settings in Makefiles had the effect of lowering the C++ standard instead of raising it as was originally intended and are removed. Note that the remaining explicit CXXSTD settings for atf and liblutok explicitly lower the standard to C++11 due to use of the deprecated auto_ptr<> template which is removed in later versions. Reviewed by: imp, asomers, dim, emaste Differential Revision: https://reviews.freebsd.org/D49223 (cherry picked from commit 6527682ab7058e5023a2a6dea01d51c15dca701f) --- lib/clang/llvm.build.mk | 1 - lib/libc/tests/stdlib/Makefile | 2 -- lib/libclang_rt/Makefile.inc | 1 - lib/libcxxrt/Makefile | 1 - lib/libgcc_eh/Makefile.inc | 1 - lib/libomp/Makefile | 1 - lib/ofed/libibnetdisc/Makefile | 1 - libexec/atf/atf-pytest-wrapper/Makefile | 1 - share/mk/bsd.sys.mk | 2 ++ share/mk/googletest.test.inc.mk | 2 -- tests/sys/fs/fusefs/Makefile | 1 - usr.bin/dtc/Makefile | 2 -- usr.sbin/pmc/Makefile | 1 - 13 files changed, 2 insertions(+), 15 deletions(-) diff --git a/lib/clang/llvm.build.mk b/lib/clang/llvm.build.mk index e06f9a2c29f6..4716ce12f48d 100644 --- a/lib/clang/llvm.build.mk +++ b/lib/clang/llvm.build.mk @@ -122,7 +122,6 @@ LDFLAGS+= -Wl,-m,elf64lriscv_fbsd .endif .endif -CXXSTD?= c++17 CXXFLAGS+= -fno-exceptions CXXFLAGS+= -fno-rtti CXXFLAGS+= -fvisibility-inlines-hidden diff --git a/lib/libc/tests/stdlib/Makefile b/lib/libc/tests/stdlib/Makefile index 14f1ab022c37..6c7c61bf291b 100644 --- a/lib/libc/tests/stdlib/Makefile +++ b/lib/libc/tests/stdlib/Makefile @@ -61,8 +61,6 @@ PROGS+= h_getopt h_getopt_long CFLAGS+= -I${.CURDIR} -CXXSTD.cxa_thread_atexit_test= c++11 -CXXSTD.cxa_thread_atexit_nothr_test= c++11 LIBADD.cxa_thread_atexit_test+= pthread # Tests that requires Blocks feature diff --git a/lib/libclang_rt/Makefile.inc b/lib/libclang_rt/Makefile.inc index 4be3c667462f..b0386bb0ae5d 100644 --- a/lib/libclang_rt/Makefile.inc +++ b/lib/libclang_rt/Makefile.inc @@ -35,4 +35,3 @@ CXXFLAGS+= -fvisibility-inlines-hidden CXXFLAGS+= -fvisibility=hidden CFLAGS+= -I${CRTSRC}/include CFLAGS+= -I${CRTSRC}/lib -CXXSTD= c++17 diff --git a/lib/libcxxrt/Makefile b/lib/libcxxrt/Makefile index 48a724dd42f2..66465694e975 100644 --- a/lib/libcxxrt/Makefile +++ b/lib/libcxxrt/Makefile @@ -21,7 +21,6 @@ SRCS+= typeinfo.cc WARNS?= 0 CFLAGS+= -isystem ${SRCDIR} -nostdinc++ -CXXSTD?= c++14 VERSION_MAP= ${.CURDIR}/Version.map .include diff --git a/lib/libgcc_eh/Makefile.inc b/lib/libgcc_eh/Makefile.inc index 75e7d743a720..82012746b2c2 100644 --- a/lib/libgcc_eh/Makefile.inc +++ b/lib/libgcc_eh/Makefile.inc @@ -39,7 +39,6 @@ CFLAGS+= -I${UNWINDINCDIR} CFLAGS+= -D_LIBUNWIND_IS_NATIVE_ONLY CFLAGS+= -D_LIBUNWIND_USE_FRAME_HEADER_CACHE CXXFLAGS+= -fno-rtti -CXXSTD?= c++11 STATIC_CXXFLAGS+= -fvisibility=hidden -fPIC # Probably need to just move this earlier or use CXXFLAGS .if ${MK_DIRDEPS_BUILD} == "yes" diff --git a/lib/libomp/Makefile b/lib/libomp/Makefile index aa9e6799ab59..81010084a2bf 100644 --- a/lib/libomp/Makefile +++ b/lib/libomp/Makefile @@ -55,7 +55,6 @@ CFLAGS+= -fdata-sections CXXFLAGS+= -fvisibility-inlines-hidden CXXFLAGS+= -fno-exceptions CXXFLAGS+= -fno-rtti -CXXSTD= c++17 .if ${COMPILER_TYPE} == "clang" .if ${MACHINE_CPUARCH} == "i386" diff --git a/lib/ofed/libibnetdisc/Makefile b/lib/ofed/libibnetdisc/Makefile index 47470132a2b6..2eb82fb8c938 100644 --- a/lib/ofed/libibnetdisc/Makefile +++ b/lib/ofed/libibnetdisc/Makefile @@ -31,7 +31,6 @@ LIBADD= osmcomp ibmad ibumad CFLAGS+= -DHAVE_CONFIG_H=1 CFLAGS+= -I${_spath} CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/infiniband -CXXSTD= c++11 VERSION_MAP= ${_spath}/libibnetdisc.map .include diff --git a/libexec/atf/atf-pytest-wrapper/Makefile b/libexec/atf/atf-pytest-wrapper/Makefile index e4dc0f8a5fd1..80b5e411ec4e 100644 --- a/libexec/atf/atf-pytest-wrapper/Makefile +++ b/libexec/atf/atf-pytest-wrapper/Makefile @@ -4,7 +4,6 @@ PACKAGE= tests PROG_CXX= atf_pytest_wrapper SRCS= atf_pytest_wrapper.cpp -CXXSTD= c++17 MAN= .include diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index e2491a49b29d..28ba3cdf70ee 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -23,6 +23,8 @@ CFLAGS+= -std=iso9899:1999 CFLAGS+= -std=${CSTD} .endif # CSTD +CXXSTD?= gnu++17 + .if !empty(CXXSTD) CXXFLAGS+= -std=${CXXSTD} .endif diff --git a/share/mk/googletest.test.inc.mk b/share/mk/googletest.test.inc.mk index 05415775448b..9ef5a3ceac00 100644 --- a/share/mk/googletest.test.inc.mk +++ b/share/mk/googletest.test.inc.mk @@ -9,6 +9,4 @@ GTESTS_CXXFLAGS+= -frtti # libgmock's, etc, headers. CXXFLAGS+= -I${DESTDIR}${INCLUDEDIR}/private -CXXSTD?= c++14 - NO_WTHREAD_SAFETY= diff --git a/tests/sys/fs/fusefs/Makefile b/tests/sys/fs/fusefs/Makefile index 1293373e2451..a8035a3bd7a4 100644 --- a/tests/sys/fs/fusefs/Makefile +++ b/tests/sys/fs/fusefs/Makefile @@ -100,7 +100,6 @@ CXXWARNFLAGS+= -Wno-vla-cxx-extension CXXFLAGS+= -I${SRCTOP}/tests CXXFLAGS+= -I${FUSEFS} CXXFLAGS+= -I${MOUNT} -CXXSTD= c++14 .for f in getmntopts.c mntopts.h CLEANFILES+= ${f} diff --git a/usr.bin/dtc/Makefile b/usr.bin/dtc/Makefile index 9b1aff13511f..d7661ae164c3 100644 --- a/usr.bin/dtc/Makefile +++ b/usr.bin/dtc/Makefile @@ -6,8 +6,6 @@ WARNS?= 3 CXXFLAGS+= -fno-rtti -fno-exceptions -CXXSTD= c++17 - NO_SHARED?=NO .include diff --git a/usr.sbin/pmc/Makefile b/usr.sbin/pmc/Makefile index dda72c85a106..a4e12470ae5e 100644 --- a/usr.sbin/pmc/Makefile +++ b/usr.sbin/pmc/Makefile @@ -6,7 +6,6 @@ PROG_CXX= pmc MAN= WARNS?= 3 CXXFLAGS+= -O0 -CXXSTD= c++14 CWARNFLAGS.gcc+= -Wno-redundant-decls CFLAGS+= -I${SRCTOP}/lib/libpmcstat