* [PATCH] libstdc++: Export the __gnu_cxx::zoneinfo_dir_override symbol.
@ 2022-12-24 11:35 Iain Sandoe
2022-12-24 12:12 ` Jonathan Wakely
0 siblings, 1 reply; 6+ messages in thread
From: Iain Sandoe @ 2022-12-24 11:35 UTC (permalink / raw)
To: libstdc++, gcc-patches
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?
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)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] libstdc++: Export the __gnu_cxx::zoneinfo_dir_override symbol.
2022-12-24 11:35 [PATCH] libstdc++: Export the __gnu_cxx::zoneinfo_dir_override symbol Iain Sandoe
@ 2022-12-24 12:12 ` Jonathan Wakely
2022-12-24 12:20 ` Iain Sandoe
0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Wakely @ 2022-12-24 12:12 UTC (permalink / raw)
To: Iain Sandoe; +Cc: libstdc++, gcc-patches, Iain Sandoe
[-- 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)
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] libstdc++: Export the __gnu_cxx::zoneinfo_dir_override symbol.
2022-12-24 12:12 ` Jonathan Wakely
@ 2022-12-24 12:20 ` Iain Sandoe
2023-01-04 15:17 ` Jonathan Wakely
0 siblings, 1 reply; 6+ messages in thread
From: Iain Sandoe @ 2022-12-24 12:20 UTC (permalink / raw)
To: Jonathan Wakely; +Cc: libstdc++, GCC Patches
> On 24 Dec 2022, at 12:12, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>
>
>
> 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,
I’d expect so, since it’s 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
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’m not ’there’ 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 <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)
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] libstdc++: Export the __gnu_cxx::zoneinfo_dir_override symbol.
2022-12-24 12:20 ` Iain Sandoe
@ 2023-01-04 15:17 ` Jonathan Wakely
2023-01-04 17:14 ` Jakub Jelinek
0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Wakely @ 2023-01-04 15:17 UTC (permalink / raw)
To: Iain Sandoe; +Cc: Jonathan Wakely, libstdc++, GCC Patches
On Sat, 24 Dec 2022 at 12:21, Iain Sandoe <iain@sandoe.co.uk> wrote:
>
>
>
> > On 24 Dec 2022, at 12:12, Jonathan Wakely wrote:
> >
> >
> >
> > 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,
>
> I’d expect so, since it’s 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 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
> 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’m not ’there’ 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 <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)
> >
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] libstdc++: Export the __gnu_cxx::zoneinfo_dir_override symbol.
2023-01-04 15:17 ` Jonathan Wakely
@ 2023-01-04 17:14 ` Jakub Jelinek
2023-01-04 17:15 ` Jonathan Wakely
0 siblings, 1 reply; 6+ messages in thread
From: Jakub Jelinek @ 2023-01-04 17:14 UTC (permalink / raw)
To: Jonathan Wakely; +Cc: Iain Sandoe, Jonathan Wakely, libstdc++, GCC Patches
On Wed, Jan 04, 2023 at 03:17:42PM +0000, Jonathan Wakely via Gcc-patches wrote:
> On Sat, 24 Dec 2022 at 12:21, Iain Sandoe <iain@sandoe.co.uk> wrote:
> >
> >
> >
> > > On 24 Dec 2022, at 12:12, Jonathan Wakely wrote:
> > >
> > >
> > >
> > > 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,
> >
> > I’d expect so, since it’s in the common file.
>
> hppa-hp-hpux* wants this symbol to be defined anyway (see PR 108228),
> so please push your patch to trunk.
Isn't it wrong though to export it with GLIBCXX_3.4 symbol version?
I mean, if it wasn't exported in GCC 3.4 libstdc++.so, then it shouldn't
be in that symver. Perhaps GLIBCXX_3.4.31 instead?
Jakub
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] libstdc++: Export the __gnu_cxx::zoneinfo_dir_override symbol.
2023-01-04 17:14 ` Jakub Jelinek
@ 2023-01-04 17:15 ` Jonathan Wakely
0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Wakely @ 2023-01-04 17:15 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Iain Sandoe, Jonathan Wakely, libstdc++, GCC Patches
On Wed, 4 Jan 2023 at 17:14, Jakub Jelinek wrote:
>
> On Wed, Jan 04, 2023 at 03:17:42PM +0000, Jonathan Wakely via Gcc-patches wrote:
> > On Sat, 24 Dec 2022 at 12:21, Iain Sandoe <iain@sandoe.co.uk> wrote:
> > >
> > >
> > >
> > > > On 24 Dec 2022, at 12:12, Jonathan Wakely wrote:
> > > >
> > > >
> > > >
> > > > 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,
> > >
> > > I’d expect so, since it’s in the common file.
> >
> > hppa-hp-hpux* wants this symbol to be defined anyway (see PR 108228),
> > so please push your patch to trunk.
>
> Isn't it wrong though to export it with GLIBCXX_3.4 symbol version?
> I mean, if it wasn't exported in GCC 3.4 libstdc++.so, then it shouldn't
> be in that symver. Perhaps GLIBCXX_3.4.31 instead?
Oops, yes! I didn't notice that! I'll move it.
Thanks for catching that.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-01-04 17:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-24 11:35 [PATCH] libstdc++: Export the __gnu_cxx::zoneinfo_dir_override symbol Iain Sandoe
2022-12-24 12:12 ` Jonathan Wakely
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
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).