From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 40153385802C; Tue, 18 Jan 2022 09:51:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 40153385802C MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-6662] libstdc++: Improve comments describing --enable-fully-dynamic-string X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: e8feb059ca2b3fb50a1ccec01a49f119ec223084 X-Git-Newrev: 5f3c0ee908b5e10f5226be0bad8b4ac55d41d985 Message-Id: <20220118095109.40153385802C@sourceware.org> Date: Tue, 18 Jan 2022 09:51:09 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jan 2022 09:51:09 -0000 https://gcc.gnu.org/g:5f3c0ee908b5e10f5226be0bad8b4ac55d41d985 commit r12-6662-g5f3c0ee908b5e10f5226be0bad8b4ac55d41d985 Author: Jonathan Wakely Date: Mon Jan 17 23:53:37 2022 +0000 libstdc++: Improve comments describing --enable-fully-dynamic-string libstdc++-v3/ChangeLog: * acinclude.m4 (GLIBCXX_ENABLE_FULLY_DYNAMIC_STRING): Improve comments. * configure: Regenerate. Diff: --- libstdc++-v3/acinclude.m4 | 17 +++++++++++------ libstdc++-v3/configure | 4 ++-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 336c690f07b..930861e6a94 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -499,19 +499,24 @@ AC_DEFUN([GLIBCXX_CHECK_LFS], [ dnl -dnl Check for whether a fully dynamic basic_string implementation should -dnl be turned on, that does not put empty objects in per-process static -dnl memory (mostly useful together with shared memory allocators, see PR -dnl libstdc++/16612 for details). +dnl Check whether the old Copy-On-Write basic_string should allocate a new +dnl empty representation for every default-constructed basic_string. Without +dnl this option, COW strings share a single empty rep in static storage, +dnl but this only works if the linker can guarantee the static storage has +dnl a unique definition in the process. It also doesn't work if basic_string +dnl objects are stored in shared memory (see PR libstdc++/16612). +dnl When fully dynamic strings are enabled, the static storage is not used +dnl and a new empty string with reference-count == 1 is allocated each time. +dnl Enabling this changes the libstdc++.so ABI. dnl dnl --enable-fully-dynamic-string defines _GLIBCXX_FULLY_DYNAMIC_STRING to 1 dnl --disable-fully-dynamic-string defines _GLIBCXX_FULLY_DYNAMIC_STRING to 0 -dnl otherwise undefined +dnl otherwise the macro is not defined. dnl + Usage: GLIBCXX_ENABLE_FULLY_DYNAMIC_STRING[(DEFAULT)] dnl Where DEFAULT is either `yes' or `no'. dnl AC_DEFUN([GLIBCXX_ENABLE_FULLY_DYNAMIC_STRING], [ - GLIBCXX_ENABLE(fully-dynamic-string,$1,,[do not put empty strings in per-process static memory]) + GLIBCXX_ENABLE(fully-dynamic-string,$1,,[do not put empty strings in per-process static memory], [permit yes|no]) if test $enable_fully_dynamic_string = yes; then enable_fully_dynamic_string_def=1 else diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 34f6718cfd0..4c9be007521 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -18679,8 +18679,8 @@ if test "${enable_fully_dynamic_string+set}" = set; then : enableval=$enable_fully_dynamic_string; case "$enableval" in yes|no) ;; - *) as_fn_error $? "Argument to enable/disable fully-dynamic-string must be yes or no" "$LINENO" 5 ;; - esac + *) as_fn_error $? "Unknown argument to enable/disable fully-dynamic-string" "$LINENO" 5 ;; + esac else enable_fully_dynamic_string=no