From nobody Tue Apr 22 18:40:25 2025 X-Original-To: dev-commits-src-main@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 4Zhrdk55TLz5t29S; Tue, 22 Apr 2025 18:40:26 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zhrdk3762z4128; Tue, 22 Apr 2025 18:40:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745347226; 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: in-reply-to:in-reply-to:references:references; bh=WegkpN4gyvvQPPT2923gNiN4CvoiA88uOwajHMWTZCE=; b=TNw7IMoBhwZhOyrd2BbGFUfFSMRD2NeM7uBQ/j+TV42hxkpJk+ygNyaJGQSNNO9e4g40Zj OWhUTCHayOJOpO0ALc+Ec9Kigho9NVKV+5x+jpiFX63SIwJFQQL2FrJraOO1AVg+2tXGRc prBz4HF2kHZn5TFTFeb+wmzwRj6Buiigktzzyx3+rIp2RZ9obIWCJdGDbm/lS/PJDWXdfZ WCmkcKN6BqFXqvUAmTJr9Ubkfbt7PFIckByyxYQfjDxTKcwRD4zK7tkC4YTqsvUcsWIgic 3RVJ+NRL6lzqFxClZmkvJknLcKU18ZIaY9MtQHUj2vLpi5MAE5KtYxX0707hyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1745347226; a=rsa-sha256; cv=none; b=V1PCP7V+NdW8+6S1c1O4M+9OdMkBDPaesjSRexlsjTt71Gjf40WscuH1XX5uzqQqfva+JE WT3mvKjpuzi15C264+kmSyImbi/vLVjO1/pcRt8tk7uPGP2lnPF5YuNxMy+hZvthdtqnfG UX+xt8+07vhIcGol63zKO0hwLbEwB0lnpYiIlpAP4FBH4R8GKs/3WFOZe9kocnxFR3Z4Nd DL4SBEvlNgirGp4PahOJweyIabeHiYLmtm1SV72vmBWZSKcAACgHpd6R7FFEiqVSKNiN5V myb0185ZRM0PJvn0eDC0a913MJNB2IHaUfopTPPxmpT0BOqrgVy3AeATcq5Zyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745347226; 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: in-reply-to:in-reply-to:references:references; bh=WegkpN4gyvvQPPT2923gNiN4CvoiA88uOwajHMWTZCE=; b=oiZm5gvhqkEeYGyBXxvXYZ/K989ARarRf64WZIM7vaWF49jFnixsmO5dH0NKBJ1AM9+k5f R4RJHPHgHCkztKTdimNRhEbyMtmmYOxRb0UpNoxnjEJs+5F/UwUVhtDQeYCTb5R/ArEmFX oiNKWSPsf8yfz8MoJaC+Y9PjGF2Ebro3QHNXJgAKO84S3sax4JlgjQ0+QNCU2XLhoHQ/zp mTZZeMuzBYXmnx2Mvpi1v8/fEFW3RPMXW6xu0B0PYVjOUbhiCh0XC+FVdqLyojmmhabDl8 q/LPJV2KImsEpfnw02cn4YsdedqBgaZZ7+nklK0QaE1dwSgTAPbTTs3C2jp88w== Received: from [10.207.153.94] (unknown [205.153.92.157]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Zhrdk20yzzXK; Tue, 22 Apr 2025 18:40:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Tue, 22 Apr 2025 14:40:25 -0400 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 6527682ab705 - main - src: Use gnu++17 as the default C++ standard Content-Language: en-US To: Mark Millard , dev-commits-src-main@freebsd.org Cc: FreeBSD Toolchain References: <5B14F0FB-54D8-4FE0-BEFA-C4713DF11B20.ref@yahoo.com> <5B14F0FB-54D8-4FE0-BEFA-C4713DF11B20@yahoo.com> From: John Baldwin In-Reply-To: <5B14F0FB-54D8-4FE0-BEFA-C4713DF11B20@yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 4/11/25 13:14, Mark Millard wrote: > John Baldwin wrote on > Date: Fri, 11 Apr 2025 13:54:30 UTC : > >> The branch main has been updated by jhb: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=6527682ab7058e5023a2a6dea01d51c15dca701f >> >> commit 6527682ab7058e5023a2a6dea01d51c15dca701f >> Author: John Baldwin >> AuthorDate: 2025-04-11 13:53:50 +0000 >> Commit: John Baldwin >> CommitDate: 2025-04-11 13:53:50 +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 > > [The note below is just a thought prompted by this. It applies > to the prior context as well.] > > As I understand many C++ ports use the system c++ toolchain > and libc++ to build and operate --and there is only one libc++ > available in some respects. If that is the case > . . . > > This ends ends up controlling the C++ library's features for > any libc++ library material used via any of: No, it does not. libc++ is mostly templates and uses many #ifdef's to provide support for multiple language standards. For the actual symbols required at runtime, we build libc++ such that it includes all of them (in particular, we use a higher CXXSTD to build libc++ itself and have for a long time). So, no, this doesn't change anything in libc++ itself. It merely changes the default C++ environment when using bsd.*.mk. The same is true of libstdc++ use by GCC. It also supports the full range of C++ versions in the dynamic library and does not require separate builds for different C++ versions. -- John Baldwin