[Bug libgcc/89714] allow for overriding the thread-detection mechanism

2020-11-23 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89714

--- Comment #4 from Jonathan Wakely  ---
That wouldn't help when people link directly with -lpthread rather than
-pthread. _REENTRANT is not required for pthreads, so I don't think we should
depend on it.

[Bug libgcc/89714] allow for overriding the thread-detection mechanism

2020-11-23 Thread tneumann at users dot sourceforge.net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89714

--- Comment #3 from Thomas Neumann  ---
Perhaps the header files could be changed to react to _REENTRANT, as that seems
to be the define that is set by gcc when requesting threading support.

The redundant checks within the shared library are less of an issue. Of course
they waste a few cycles, too, but the unnecessary checks in the header files
are far worse as they are inlined all over the place when using, e.g.,
shared_ptr.

[Bug libgcc/89714] allow for overriding the thread-detection mechanism

2020-11-23 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89714

--- Comment #2 from Jonathan Wakely  ---
-D_GLIBCXX_GTHREAD_USE_WEAK=0 appears to work, but is not officially supported.

It also only affects the code in the libstdc++ headers, not the code inside
libstdc++.so that checks __gthread_active_p.

[Bug libgcc/89714] allow for overriding the thread-detection mechanism

2019-03-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89714

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-03-14
 Ever confirmed|0   |1
   Severity|normal  |enhancement

--- Comment #1 from Jonathan Wakely  ---
Confirmed.