public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Iain Sandoe <iain@sandoe.co.uk>
Cc: "libstdc++" <libstdc++@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>,
	 Iain Sandoe <iains.gcc@gmail.com>
Subject: Re: [PATCH] libstdc++: Export the __gnu_cxx::zoneinfo_dir_override symbol.
Date: Sat, 24 Dec 2022 12:12:17 +0000	[thread overview]
Message-ID: <CAH6eHdSz9x_3EB0fYw03UaTtCDym+v-ndM0YwTqj=UQ+RFN4pQ@mail.gmail.com> (raw)
In-Reply-To: <20221224113525.20201-1-iain@sandoe.co.uk>

[-- Attachment #1: Type: text/plain, Size: 1906 bytes --]

On Sat, 24 Dec 2022, 11:35 Iain Sandoe via Libstdc++, <libstdc++@gcc.gnu.org>
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 <iain@sandoe.co.uk>
>
> 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)
>
>

  reply	other threads:[~2022-12-24 12:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-24 11:35 Iain Sandoe
2022-12-24 12:12 ` Jonathan Wakely [this message]
2022-12-24 12:20   ` Iain Sandoe
2023-01-04 15:17     ` Jonathan Wakely
2023-01-04 17:14       ` Jakub Jelinek
2023-01-04 17:15         ` Jonathan Wakely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH6eHdSz9x_3EB0fYw03UaTtCDym+v-ndM0YwTqj=UQ+RFN4pQ@mail.gmail.com' \
    --to=jwakely.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iain@sandoe.co.uk \
    --cc=iains.gcc@gmail.com \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).