Re: [PATCH] libsupc++: try cxa_thread_atexit_impl at runtime

2023-12-06 Thread Alexandre Oliva
On Dec 6, 2023, Jonathan Wakely wrote: >> -void *obj, void *dso_handle) >> +void *obj, [[maybe_unused]] void >> *dso_handle) > The patch is OK with that change. Thanks, here's what I'm going to install. Regstrapped on x86_64-lin

Re: [PATCH] libsupc++: try cxa_thread_atexit_impl at runtime

2023-12-06 Thread Jonathan Wakely
On Wed, 6 Dec 2023 at 13:53, Jonathan Wakely wrote: > > On Wed, 6 Dec 2023 at 12:30, Thomas Schwinge wrote: > > > > Hi Alexandre! > > > > On 2023-12-06T02:28:42-0300, Alexandre Oliva wrote: > > > libsupc++: try cxa_thread_atexit_impl at runtime > > > > > > g++.dg/tls/thread_local-order2.C fails

Re: [PATCH] libsupc++: try cxa_thread_atexit_impl at runtime

2023-12-06 Thread Jonathan Wakely
On Wed, 6 Dec 2023 at 12:30, Thomas Schwinge wrote: > > Hi Alexandre! > > On 2023-12-06T02:28:42-0300, Alexandre Oliva wrote: > > libsupc++: try cxa_thread_atexit_impl at runtime > > > > g++.dg/tls/thread_local-order2.C fails when the toolchain is built for > > a platform that lacks __cxa_thread_

Re: [PATCH] libsupc++: try cxa_thread_atexit_impl at runtime

2023-12-06 Thread Thomas Schwinge
Hi Alexandre! On 2023-12-06T02:28:42-0300, Alexandre Oliva wrote: > libsupc++: try cxa_thread_atexit_impl at runtime > > g++.dg/tls/thread_local-order2.C fails when the toolchain is built for > a platform that lacks __cxa_thread_atexit_impl, even if the program is > built and run using that toolc

Re: [PATCH] libsupc++: try cxa_thread_atexit_impl at runtime

2023-12-05 Thread Alexandre Oliva
On Dec 5, 2023, Alexandre Oliva wrote: > Maybe we should narrow it down to targets in which weak undefined > symbols are available with the expected semantics, and where the symbol > is known to have ever been defined in libc. On it... This patch reintroduces the weak symbol reference only on

Re: [PATCH] libsupc++: try cxa_thread_atexit_impl at runtime

2023-12-05 Thread Alexandre Oliva
On Dec 5, 2023, David Edelsohn wrote: > The error is: > ld: 0711-317 ERROR: Undefined symbol: __cxa_thread_atexit_impl > from the new, weak reference. Thanks. > Also, earlier in atexit_thread.cc, there is another definition protected by > _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL > not utilized

Re: [PATCH] libsupc++: try cxa_thread_atexit_impl at runtime

2023-12-05 Thread Alexandre Oliva
Hello, David, On Dec 5, 2023, David Edelsohn wrote: > This patch broke bootstrap on AIX. The stage1 compiler is not able to > build a program and stage2 configure fails. Thanks for the report. sorry about the breakage. If the patch makes any difference, this suggests that __GXX_WEAK__ is def

Re: [PATCH] libsupc++: try cxa_thread_atexit_impl at runtime

2023-12-05 Thread Andrew Pinski
On Tue, Dec 5, 2023 at 3:15 PM David Edelsohn wrote: > > The error is: > > ld: 0711-317 ERROR: Undefined symbol: __cxa_thread_atexit_impl > > > from the new, weak reference. By the way this seems like the same issue on nvptx too. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112858 which has a

Re: [PATCH] libsupc++: try cxa_thread_atexit_impl at runtime

2023-12-05 Thread David Edelsohn
The error is: ld: 0711-317 ERROR: Undefined symbol: __cxa_thread_atexit_impl from the new, weak reference. Also, earlier in atexit_thread.cc, there is another definition protected by _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL not utilized by the new reference. Thanks, David On Tue, Dec 5, 2

Re: [PATCH] libsupc++: try cxa_thread_atexit_impl at runtime

2023-12-05 Thread David Edelsohn
Alex, This patch broke bootstrap on AIX. The stage1 compiler is not able to build a program and stage2 configure fails. Thanks, David

Re: [PATCH] libsupc++: try cxa_thread_atexit_impl at runtime

2023-12-01 Thread Jason Merrill
On 12/1/23 15:40, Alexandre Oliva wrote: On Nov 9, 2023, Jonathan Wakely wrote: On Thu, 9 Nov 2023 at 01:56, Alexandre Oliva wrote: g++.dg/tls/thread_local-order2.C fails when the toolchain is built for a platform that lacks __cxa_thread_atexit_impl, even if the program is built and run u

Re: [PATCH] libsupc++: try cxa_thread_atexit_impl at runtime

2023-12-01 Thread Alexandre Oliva
On Nov 9, 2023, Jonathan Wakely wrote: > On Thu, 9 Nov 2023 at 01:56, Alexandre Oliva wrote: >> g++.dg/tls/thread_local-order2.C fails when the toolchain is built for >> a platform that lacks __cxa_thread_atexit_impl, even if the program is >> built and run using that toolchain on a (later) pl

Re: [PATCH] libsupc++: try cxa_thread_atexit_impl at runtime

2023-11-09 Thread Jonathan Wakely
On Thu, 9 Nov 2023 at 01:56, Alexandre Oliva wrote: > > > g++.dg/tls/thread_local-order2.C fails when the toolchain is built for > a platform that lacks __cxa_thread_atexit_impl, even if the program is > built and run using that toolchain on a (later) platform that offers > __cxa_thread_atexit_imp

[PATCH] libsupc++: try cxa_thread_atexit_impl at runtime

2023-11-08 Thread Alexandre Oliva
g++.dg/tls/thread_local-order2.C fails when the toolchain is built for a platform that lacks __cxa_thread_atexit_impl, even if the program is built and run using that toolchain on a (later) platform that offers __cxa_thread_atexit_impl. This patch adds runtime testing for __cxa_thread_atexit_imp