From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp002.apm-internet.net (smtp002.apm-internet.net [85.119.248.221]) by sourceware.org (Postfix) with ESMTPS id 594433858284 for ; Sat, 24 Dec 2022 12:20:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 594433858284 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sandoe.co.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=sandoe.co.uk Received: (qmail 77569 invoked from network); 24 Dec 2022 12:20:56 -0000 X-APM-Out-ID: 16718844567756 X-APM-Authkey: 257869/1(257869/1) 6 Received: from unknown (HELO smtpclient.apple) (81.138.1.83) by smtp002.apm-internet.net with SMTP; 24 Dec 2022 12:20:56 -0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: [PATCH] libstdc++: Export the __gnu_cxx::zoneinfo_dir_override symbol. From: Iain Sandoe In-Reply-To: Date: Sat, 24 Dec 2022 12:20:56 +0000 Cc: libstdc++ , GCC Patches Content-Transfer-Encoding: quoted-printable Message-Id: <448810FA-97CC-430A-B9A0-75EDB470C935@sandoe.co.uk> References: <20221224113525.20201-1-iain@sandoe.co.uk> To: Jonathan Wakely X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spam-Status: No, score=-14.1 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_COUK,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,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: > On 24 Dec 2022, at 12:12, Jonathan Wakely = wrote: >=20 >=20 >=20 > On Sat, 24 Dec 2022, 11:35 Iain Sandoe via Libstdc++, = wrote: > If this is not the right place to export the symbol (or you do not = want > to export it in the general case), I can always add a = platform-specific > file for it. So far, tested on x86_64-darwin21, wider testing will > follow over the holidays. >=20 > OK for trunk? >=20 > I'd like to check if this causes the undefined weak symbol to be = exported on ELF, I=E2=80=99d expect so, since it=E2=80=99s in the common file. > but I suppose that doesn't really cause any harm if it is. The symbol = name is in our own namespace so can't clash with user symbols. We can't = declare that function in a header, because "zoneinfo_dir_override" is = not a reserved name so could clash with user macros (we could prefix it = with underscores, but since it's possible to override it without the = library providing a declaration, I think it would be "nicer" to not use = an ugly reserved name for something users are supposed to define = themselves). I can also investigate the alternate solution for Darwin - where we pass = -U,symbolname to the linker. In that case, we do not need to provide a weak def. in the library (it = looks more ELF-like) but the symbol does still need to be exported - however that could Darwin-local too as = noted above. (none of this is urgent, bootstrap is fixed - I was just poking at the = problems while they were fresh in=20 my mind; although the fails are removed when I configure to an = installation with tzdata.zi, there are still fails to deal with when using the system installation .. so I=E2=80= =99m not =E2=80=99there=E2=80=99 yet .. ) cheers Iain >=20 >=20 >=20 >=20 > Iain >=20 > --- 8< --- >=20 > This symbol needs to be visible in the library interface for Darwin > to override it with a user-provided one. >=20 > Signed-off-by: Iain Sandoe >=20 > libstdc++-v3/ChangeLog: >=20 > * config/abi/pre/gnu.ver (GLIBCXX_3.4): > Add __gnu_cxx::zoneinfo_dir_override(). > --- > libstdc++-v3/config/abi/pre/gnu.ver | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/libstdc++-v3/config/abi/pre/gnu.ver = b/libstdc++-v3/config/abi/pre/gnu.ver > index 570ffca8710..bd4ab450652 100644 > --- a/libstdc++-v3/config/abi/pre/gnu.ver > +++ b/libstdc++-v3/config/abi/pre/gnu.ver > @@ -1104,6 +1104,9 @@ GLIBCXX_3.4 { > # std::uncaught_exception() > _ZSt18uncaught_exceptionv; >=20 > + # __gnu_cxx::zoneinfo_dir_override() > + _ZN9__gnu_cxx21zoneinfo_dir_overrideEv > + > # DO NOT DELETE THIS LINE. Port-specific symbols, if any, will be = here. >=20 > local: > --=20 > 2.37.1 (Apple Git-137.1) >=20