From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by sourceware.org (Postfix) with ESMTPS id 8C146385841D; Mon, 28 Nov 2022 18:45:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8C146385841D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-x329.google.com with SMTP id p13-20020a05600c468d00b003cf8859ed1bso9062515wmo.1; Mon, 28 Nov 2022 10:45:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:references:cc:to:from:content-language:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=WLnV4olwt70uiRLtbWXK6vUCHJXrApHUo3Nr8NoFyWE=; b=PFjiFqoOIQB3N1zQS1g5Uubf9JVC1DbJPM+IMI8AzEz5nDaJSV8LG+DVQeSoJcUxKd ExaYl1hjRvnSOJaGqyiRVEVdLg3J6dXojmlvzs5dEJ8Wk33pleI6X+VJAG+qWOgVjgCl OpgrDwXHoOQNGvAeYOu6HgXrinWj9jrkJ8oSjliYKEwOus5jURGsCsWRNcd4Dpux3P2J Bqsrc/8pMm/mcHVpcE7Cmu94NcLkXcz6rRc59JVZmbMhRs8Vi7JurV74FzxxN5zXfFRr 0UkTldYUDN2S1aOuU4xmnMBe51GylKXhTWpXYsTAyum3ZvkS8CUSvZCZSL6Jg5e3JYml g3YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:references:cc:to:from:content-language:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=WLnV4olwt70uiRLtbWXK6vUCHJXrApHUo3Nr8NoFyWE=; b=Khor0AJwxuwwAR6frJbZAlyQVYeAY8AEmPK9Q1H43PP7TlI4dtDeZ8fexBbRyrgvIa zf2CEUDg0M5aFB357VHycAuT0wvIJdrLoHcy4mxNDY5B8OgC1ptW7W5pp/b6C8JLJwmP 4vIl2GhjyIqhBPBjZVrusAXk21gidPWo9ukm565hO1SAkeofmVHuP57JiUAE19JbBOTD u57RRVt+PeTX11CF9DpvfZo+zWPIvWI9WsG41561tfEbZeNSlE7lyCPkAjmlb+GzFCHk /P7zQ+lVuRl/TZ5CuicGuAmo8poi0tOfKZILjWuO5zoLtb4BSaaDrgTyM71Y+2wHM0XB YLNA== X-Gm-Message-State: ANoB5plZ0qZgdpe4eCK9swNpY86zG+dwcA92C3PhNs3bBGEOIRgIs9ty 0MMDnCSHamRds7di1j6BCcE= X-Google-Smtp-Source: AA0mqf5iHUCrZpKL4fdwlNUiTxt9sGBe9FCFari5qL7R3XqQzafhI94cYJ0Uhr1L2lH3/3GDlo3cNA== X-Received: by 2002:a05:600c:3495:b0:3cf:ae53:918f with SMTP id a21-20020a05600c349500b003cfae53918fmr27492304wmq.131.1669661129434; Mon, 28 Nov 2022 10:45:29 -0800 (PST) Received: from [192.168.42.68] (pop.92-184-116-174.mobile.abo.orange.fr. [92.184.116.174]) by smtp.googlemail.com with ESMTPSA id a7-20020a05600c348700b003cf75f56105sm17846662wmq.41.2022.11.28.10.45.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Nov 2022 10:45:28 -0800 (PST) Content-Type: multipart/alternative; boundary="------------mvkBMSgc0W8YAKoubWBG8Sdu" Message-ID: <5fbf8139-9f8c-9b56-eae3-8c441e6ad4ee@gmail.com> Date: Mon, 28 Nov 2022 19:45:27 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH][_GLIBCXX_INLINE_VERSION] Adapt to_chars/from_chars symbols Content-Language: fr From: =?UTF-8?Q?Fran=c3=a7ois_Dumont?= To: Jonathan Wakely Cc: "libstdc++@gcc.gnu.org" , gcc-patches References: In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This is a multi-part message in MIME format. --------------mvkBMSgc0W8YAKoubWBG8Sdu Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit I forgot to add the patch but as you already made another feedback I'll clean my patch first. On 28/11/22 19:43, François Dumont wrote: > On 28/11/22 11:21, Jonathan Wakely wrote: >> >> >> On Mon, 28 Nov 2022 at 10:10, Jonathan Wakely wrote: >> >> >> >> On Mon, 28 Nov 2022 at 06:07, François Dumont via Libstdc++ >> > wrote: >> >> This patch is fixing those tests: >> >> 20_util/to_chars/float128_c++23.cc >> std/format/formatter/requirements.cc >> std/format/functions/format.cc >> std/format/functions/format_to_n.cc >> std/format/functions/size.cc >> std/format/functions/vformat_to.cc >> std/format/string.cc >> >> Note that symbols used in for __ibm128 and __iee128 >> are untested. >> >> I even wonder if the normal mode ones are because I cannot >> find the >> symbols used in gnu.ver. >> >> >>      libstdc++: [_GLIBCXX_INLINE_VERSION] Add >> to_chars/from_chars >> symbols export >> >>      libstdc++-v3/ChangeLog >> >>              * include/std/format >> [_GLIBCXX_INLINE_VERSION](to_chars): >> Adapt __asm symbol >>              specifications. >>              * config/abi/pre/gnu-versioned-namespace.ver: Add >> to_chars/from_chars symbols >>              export. >> >> Ok to commit ? >> >> >> >> Why are changes needed to the linker script? >> >> Those functions should already match the general wildcard: >> >>     # Names inside the 'extern' block are demangled names. >>     extern "C++" >>     { >>       std::*; >>       std::__8::*; >>     }; >> >> >> > No idear, my guess was that it has something to do with the __asm > usages in and with the commnt: > >   // These overloads exist in the library, but are not declared for C++20. >   // Make them available as std::__format::to_chars. > > Maybe they exist in the library but are unused so not exported unless > specified in the linker script ? > > >> >> Instead of nine separate #if blocks, can we just do: >> >> #if _GLIBCXX_INLINE_VERSION >> # define _GLIBCXX_ALIAS(S) __asm("_ZNSt3__8" S) >> #else >> # define _GLIBCXX_ALIAS(S) __asm("_ZNSt" S) >> #endif >> >>  And then use: >> >>   _GLIBCXX_ALIAS("8to_charsPcS_eSt12chars_format"); >> >> and finally: >> >> #undef _GLIBCXX_ALIAS >> >> > I tried and as expected it's not working because the diff in the > symbol is not limited to the '3__8' pattern. 'chars_format' is also > defined in versioned namespace which might perhaps explain some > mangling diff. > > Here is an updated patch though, I had forgotten to replace a _DF128 > with a __ieee128 in the untested part of this patch. > > If you prefer to take a closer look later I'll just re-submit my patch > to move versioned namespace mode to cxx11 abi knowing that those tests > are already FAIL. > > François > > --------------mvkBMSgc0W8YAKoubWBG8Sdu--