From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id A3C0F3858D35 for ; Wed, 4 Jan 2023 15:17:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A3C0F3858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1672845477; 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=9rTx1Sb7bAwv0CZwi6BqyqD7XxASL0oK9mXja+pmpBI=; b=dCmtR7+5hctdI7+IU+wDnaxiDeSwIkwiT+dSVch93TgWLRkvnOu5401DrXo3X7ycVq1Ddo 4hOgS+5BAC8wHjklIo04c9N4AAr+SQawQ7fvxNX5OTup6z1VNfSxv7R40XCqrFZWIAo6d5 UrW0V+CUjc3rdhaP+zspGn2lbWQvZhM= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-175-UJkbq1ayNViUHJFLxXUapQ-1; Wed, 04 Jan 2023 10:17:56 -0500 X-MC-Unique: UJkbq1ayNViUHJFLxXUapQ-1 Received: by mail-lf1-f70.google.com with SMTP id l15-20020a056512110f00b004b6fe4513b7so12101089lfg.23 for ; Wed, 04 Jan 2023 07:17:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9rTx1Sb7bAwv0CZwi6BqyqD7XxASL0oK9mXja+pmpBI=; b=XgeMVEinINOzezNRnXqP0DQPn24g5EwqrbHvdWK0y4Je8FSd7vRuV2QFg/aW1yXIaA 3xn2zHEoRv55f3PhLEJSOsz7uEbhoiFRmSBO1zD9Uchz+kQu3rxPd+qo6MkWcB8TDXkZ YjoupP2sBbwnUKNVHDNvOGOML/iU98Bs8bOqNkY1mpaSNxGlu7aAGlk9tRnwiKdbM05S +Zob5UD48YqCpOsFv50y04mhIpFzVl4UQkOOjkiEDT77Mj7A1+ndDJesaVoaASaT30wv q7BaCJwaBeDUN359uV9q1Ya79BKGimXq2vvBxifoc3WV0HXTgZZ/0PhVGiLkmAT2Vxm5 syRQ== X-Gm-Message-State: AFqh2ko/HCzlUjnnXrdngpAP2jWu4+NedBdHwADXrKfphxT2adV7le7Z GfBkLI0oJwBOF8Uh1Ub0yjl5MX35Sy7o86XoYIkCsTeKO5+DiqSGICcThI9BFAt7fMn08sa6ErL fQ3v70z6pAC8U20QTcbHBhs8evkdNE3c= X-Received: by 2002:a05:651c:201e:b0:27f:f3a4:2927 with SMTP id s30-20020a05651c201e00b0027ff3a42927mr843419ljo.77.1672845474535; Wed, 04 Jan 2023 07:17:54 -0800 (PST) X-Google-Smtp-Source: AMrXdXs3fgbuEOT7tc65/5SonPl+5lmuxIXUxsPJHKppnl/5+Ok45REWl0pic5/ov5wbTE23X47w/uPwmDWLxfPyIwI= X-Received: by 2002:a05:651c:201e:b0:27f:f3a4:2927 with SMTP id s30-20020a05651c201e00b0027ff3a42927mr843415ljo.77.1672845474117; Wed, 04 Jan 2023 07:17:54 -0800 (PST) MIME-Version: 1.0 References: <20221224113525.20201-1-iain@sandoe.co.uk> <448810FA-97CC-430A-B9A0-75EDB470C935@sandoe.co.uk> In-Reply-To: <448810FA-97CC-430A-B9A0-75EDB470C935@sandoe.co.uk> From: Jonathan Wakely Date: Wed, 4 Jan 2023 15:17:42 +0000 Message-ID: Subject: Re: [PATCH] libstdc++: Export the __gnu_cxx::zoneinfo_dir_override symbol. To: Iain Sandoe Cc: Jonathan Wakely , "libstdc++" , GCC Patches X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,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 Sat, 24 Dec 2022 at 12:21, Iain Sandoe wrote: > > > > > On 24 Dec 2022, at 12:12, Jonathan Wakely wrote: > > > > > > > > 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 wan= t > > to export it in the general case), I can always add a platform-specifi= c > > file for it. So far, tested on x86_64-darwin21, wider testing will > > follow over the holidays. > > > > OK for trunk? > > > > I'd like to check if this causes the undefined weak symbol to be export= ed on ELF, > > I=E2=80=99d expect so, since it=E2=80=99s in the common file. hppa-hp-hpux* wants this symbol to be defined anyway (see PR 108228), so please push your patch to trunk. > > > but I suppose that doesn't really cause any harm if it is. The symbol n= ame is in our own namespace so can't clash with user symbols. We can't decl= are that function in a header, because "zoneinfo_dir_override" is not a res= erved name so could clash with user macros (we could prefix it with undersc= ores, 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 lo= oks more ELF-like) but the symbol > does still need to be exported - however that could Darwin-local too as n= oted above. > > (none of this is urgent, bootstrap is fixed - I was just poking at the pr= oblems while they were fresh in > my mind; although the fails are removed when I configure to an installa= tion 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 > > > > > > > > > > > Iain > > > > --- 8< --- > > > > This symbol needs to be visible in the library interface for Darwin > > to override it with a user-provided one. > > > > Signed-off-by: Iain Sandoe > > > > libstdc++-v3/ChangeLog: > > > > * 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(+) > > > > 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; > > > > + # __gnu_cxx::zoneinfo_dir_override() > > + _ZN9__gnu_cxx21zoneinfo_dir_overrideEv > > + > > # DO NOT DELETE THIS LINE. Port-specific symbols, if any, will be h= ere. > > > > local: > > -- > > 2.37.1 (Apple Git-137.1) > > >