Bug#189983: libstdc++5: symbol __gnu_cxx::_Atomic_add_mutex missing
Matthias Klose writes:
> This is due to the merged atomicity.h (generic for i386, i486 for
> above i386). The generic one defines _GLIBCPP_NEED_GENERIC_MUTEX,
> which is referenced in misc-inst.cc. A solution would be to define
> this in the "i486" part of the merged atomicity.h as well, so the
> following code is included in the i486 version of libstdc++ as well.
> Does the extra initialization do any harm?
running the testsuite with this patch does not show any difference,
applying it to the next upload.
> #ifdef _GLIBCPP_NEED_GENERIC_MUTEX
> namespace __gnu_cxx
> {
> #ifdef __GTHREAD_MUTEX_INIT
> __gthread_mutex_t _Atomic_add_mutex = __GTHREAD_MUTEX_INIT;
> #else
> // generic atomicity.h without static initialization
> __gthread_mutex_t _Atomic_add_mutex;
> __gthread_once_t _Atomic_add_mutex_once = __GTHREAD_ONCE_INIT;
> void __gthread_atomic_add_mutex_once()
> {
> __GTHREAD_MUTEX_INIT_FUNCTION (&_Atomic_add_mutex);
> }
> #endif
> } // namespace __gnu_cxx
> #endif // _GLIBCPP_NEED_GLOBAL_MUTEX
Reply to: