Module Name: src Committed By: kamil Date: Sat Dec 24 15:48:26 UTC 2016
Modified Files: src/external/gpl3/gcc/dist/libstdc++-v3/include/std: mutex src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11: mutex.cc Log Message: Revert introduction of FIXME_PR_51139 This change introduced ABI incompatible change with older versions shipped on NetBSD. This back out code that is currently not working correctly due to TLS-based std::call_once implementation in GNU libstdc++. Error when starting gnuchash: /usr/pkg/lib/libwebkitgtk-1.0.so.0: Undefined symbol "_ZSt15__once_callable" (symnum = 1705) PR 51139 Reported by <wiz> To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/gpl3/gcc/dist/libstdc++-v3/include/std/mutex cvs rdiff -u -r1.2 -r1.3 \ src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/mutex.cc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/gpl3/gcc/dist/libstdc++-v3/include/std/mutex diff -u src/external/gpl3/gcc/dist/libstdc++-v3/include/std/mutex:1.2 src/external/gpl3/gcc/dist/libstdc++-v3/include/std/mutex:1.3 --- src/external/gpl3/gcc/dist/libstdc++-v3/include/std/mutex:1.2 Wed Dec 21 21:55:46 2016 +++ src/external/gpl3/gcc/dist/libstdc++-v3/include/std/mutex Sat Dec 24 15:48:26 2016 @@ -695,7 +695,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION call_once(once_flag& __once, _Callable&& __f, _Args&&... __args); }; -#if defined(_GLIBCXX_HAVE_TLS) && defined(FIXME_PR_51139) +#ifdef _GLIBCXX_HAVE_TLS extern __thread void* __once_callable; extern __thread void (*__once_call)(); @@ -722,7 +722,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION void call_once(once_flag& __once, _Callable&& __f, _Args&&... __args) { -#if defined(_GLIBCXX_HAVE_TLS) && defined(FIXME_PR_51139) +#ifdef _GLIBCXX_HAVE_TLS auto __bound_functor = std::__bind_simple(std::forward<_Callable>(__f), std::forward<_Args>(__args)...); __once_callable = std::__addressof(__bound_functor); @@ -737,7 +737,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION int __e = __gthread_once(&__once._M_once, &__once_proxy); -#if !defined(_GLIBCXX_HAVE_TLS) || !defined(FIXME_PR_51139) +#ifndef _GLIBCXX_HAVE_TLS if (__functor_lock) __set_once_functor_lock_ptr(0); #endif Index: src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/mutex.cc diff -u src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/mutex.cc:1.2 src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/mutex.cc:1.3 --- src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/mutex.cc:1.2 Wed Dec 21 21:55:46 2016 +++ src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/mutex.cc Sat Dec 24 15:48:26 2016 @@ -25,7 +25,7 @@ #include <mutex> #if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) -#if !defined(_GLIBCXX_HAVE_TLS) || !defined(FIXME_PR_51139) +#ifndef _GLIBCXX_HAVE_TLS namespace { inline std::unique_lock<std::mutex>*& @@ -41,7 +41,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul { _GLIBCXX_BEGIN_NAMESPACE_VERSION -#if defined(_GLIBCXX_HAVE_TLS) && defined(FIXME_PR_51139) +#ifdef _GLIBCXX_HAVE_TLS __thread void* __once_callable; __thread void (*__once_call)(); #else @@ -76,7 +76,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { void __once_proxy() { -#if !defined(_GLIBCXX_HAVE_TLS) || !defined(FIXME_PR_51139) +#ifndef _GLIBCXX_HAVE_TLS function<void()> __once_call = std::move(__once_functor); if (unique_lock<mutex>* __lock = __get_once_functor_lock_ptr()) {