From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by sourceware.org (Postfix) with ESMTPS id 90E7B3858C62; Mon, 28 Nov 2022 18:43:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 90E7B3858C62 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-x32d.google.com with SMTP id p13-20020a05600c468d00b003cf8859ed1bso9058866wmo.1; Mon, 28 Nov 2022 10:43:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=50bA9oPWQbewWMO4mn6tqx5QKec1H6+xyQhTCHvo+gg=; b=C3BPV0SjNEfsAhALEk1tuNzajHTE843PMN0TaEMePncEtB6RKBW+tuQiseNB8skAwX o4gJTuZouzKHwPEx5KVGG5diV+0B54+okONO2T7cERkdaq5eUCztY2zrPIo3eclb4TaW yQptGSVKWoiTc2hAxFIf9jIhnjXYOXnVnkMQ90iWmQEoASMYOIi/phy1sNQn8cvRbq/Z TbyAJRB67vT2tME7jDicYFXK80ZqixA0s1+hxCD/mXGjFRFG4/U4Kd1Gf//4/bjWZKO4 qh8xIJsDUyLohHiJWiJXBTzguqS/5adQ+9njB9CyZr3N8kpzEOoGls9Lhib6kSIyRvKL nbYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=50bA9oPWQbewWMO4mn6tqx5QKec1H6+xyQhTCHvo+gg=; b=zJAY+Dq9wqCwGn9Yrwk74IA2YaTYrZPwOeaVfQNcdjA8tK3XVvdVCCw+BoFruNr2F0 H4n+H6+/tuTOwEPQAUNeF6r3n6odGfi4UCMgqW8UwnzQUy56JUMoutK7HOCNgvklG78s TCz0tM2dKmAO7L9FhuY4Khq2SX8FGEUVQwl17Fu/dFgHyEHBHskzhQYzjrbtSCVNyqbj KAZCFSq6RlnYjlipi65FNNrSbeP7zNCaug2DM5wC697nLFAn33zLJBo8juZjjxvHrXiO 167ICDKhDL31AcAjHhGvXLPs7+3ngwraiwXFV2a4XW2+JMGoDJ0F8AJdVpxTBiuJKeEl QlTA== X-Gm-Message-State: ANoB5pmheLouo8SzmXCzDZWeYrx6hpFoCU04zWLR6ll55E9Yj/yytU9Z 0O1vHwLhLjAfyRKmZB37WAU= X-Google-Smtp-Source: AA0mqf79G6fpvuzp9J92QAE2/y8TyzHekwjESOLbwM+G2bnd3KCL7rfcLdRntW0uJ8knmEDByddqbA== X-Received: by 2002:a7b:cd18:0:b0:3cf:a359:de90 with SMTP id f24-20020a7bcd18000000b003cfa359de90mr28871613wmj.122.1669661015154; Mon, 28 Nov 2022 10:43:35 -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 m15-20020a5d4a0f000000b00235da296623sm11521190wrq.31.2022.11.28.10.43.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Nov 2022 10:43:34 -0800 (PST) Content-Type: multipart/alternative; boundary="------------hfVwJwzGXgILMvzSX2IDRlgc" Message-ID: Date: Mon, 28 Nov 2022 19:43:33 +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 To: Jonathan Wakely Cc: "libstdc++@gcc.gnu.org" , gcc-patches References: From: =?UTF-8?Q?Fran=c3=a7ois_Dumont?= 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. --------------hfVwJwzGXgILMvzSX2IDRlgc Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 --------------hfVwJwzGXgILMvzSX2IDRlgc--