From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by sourceware.org (Postfix) with ESMTPS id 494E43858D1E; Sat, 24 Dec 2022 12:12:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 494E43858D1E 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-ej1-x632.google.com with SMTP id u19so17372426ejm.8; Sat, 24 Dec 2022 04:12:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=hScilAM7drT5sObWP/n/H74ekPNsOMQDaVVD7KhrZrQ=; b=eKgpM2kKydi/5qi8YaKRWXPnbGC2zDf0Jsas3ELIlIIlSa+9HeKRHI7qLhX5WRkDFn TqunntWev3MGQUNIjCHeQ/h/SO+dAvw/cays4MkmcWeahI1suIrr2Z2yVR8Q7N0qQQe+ tLh94yqVwiIoTfigCtz/rQSF1ICogB5Y+rQUQBlYALXQ5UyHPLD1R1Q5JYvVzMG8VvYx pqkccq79luZ6bMQLAz/m+FA8kl7/fR0mqjc9Y7L2ThdFpQZtEZkoeQ7Pal0HnekaZbwu rVFAoXllysNLZqhm3xiQVkLElIFc+qAgP0OasqYu7mU1GgSYwhLlhKe2Hqaoum5k6MCB vJwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=hScilAM7drT5sObWP/n/H74ekPNsOMQDaVVD7KhrZrQ=; b=yoOgcscwfYS2rE+b4r5w9Tuciv2gvmcROea6dJ7nqLIDw5lM+zRzC3qycEcHQppcml xRLbIFDseP3QTsRCVA9j9mw09vm5B3QmpWJT7TNSr9wll7kvHyfUukUJT7DOExkKAvWT R64fMf/Zi7wxqv2A3RkmSe+vc4jKMRrudi5Hq0Ss5VcFJECBS/IVK5R30HVd1BdeLxmL anwo4WdQQwXtO1wupZEslU6jrs7x8gPbsKDUSTk4SHKk/3EcOFpSmTUz6Gcrt4PapvAx y1GOE3z4OHQGG+vZzw3ATMGS7QguM3+Tiqr+hTOs6edJPwFBn2LsXnImMcrxbF5+dIMF T87g== X-Gm-Message-State: AFqh2kq2h2WejSHs2YD2NS9oOPou9rJFnp1SVl7VAC3MPeMUpfSeELDc yWN2QD6iowZ7TsGD8Y1PyvZmenHnTJTcYKpaoec= X-Google-Smtp-Source: AMrXdXvxOohazBeEj+GEh2j1uDyYPla2pOXZcqKhFhVbhjoRdPim7mKGiBJv01YnDUjDj8a3BjA4TJQMUF0SIX9sB6A= X-Received: by 2002:a17:906:9243:b0:7c0:d58f:3409 with SMTP id c3-20020a170906924300b007c0d58f3409mr694414ejx.416.1671883949083; Sat, 24 Dec 2022 04:12:29 -0800 (PST) MIME-Version: 1.0 References: <20221224113525.20201-1-iain@sandoe.co.uk> In-Reply-To: <20221224113525.20201-1-iain@sandoe.co.uk> From: Jonathan Wakely Date: Sat, 24 Dec 2022 12:12:17 +0000 Message-ID: Subject: Re: [PATCH] libstdc++: Export the __gnu_cxx::zoneinfo_dir_override symbol. To: Iain Sandoe Cc: "libstdc++" , gcc-patches , Iain Sandoe Content-Type: multipart/alternative; boundary="000000000000e4124005f091d068" X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,HTML_MESSAGE,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: --000000000000e4124005f091d068 Content-Type: text/plain; charset="UTF-8" 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. > > OK for trunk? > I'd like to check if this causes the undefined weak symbol to be exported on ELF, 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). 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 here. > > local: > -- > 2.37.1 (Apple Git-137.1) > > --000000000000e4124005f091d068--