diff options
author | ro <ro@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-17 13:38:15 +0000 |
---|---|---|
committer | ro <ro@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-17 13:38:15 +0000 |
commit | 3b7b1092bc50d9042b9cb6e26c479cc8c0dd2150 (patch) | |
tree | a835e12160cb96250445b0ea605d5f915eb666e0 /libstdc++-v3/acinclude.m4 | |
parent | 58f44f3ecd3e48dda1d56fa96ae02c4e923879aa (diff) | |
download | ppe42-gcc-3b7b1092bc50d9042b9cb6e26c479cc8c0dd2150.tar.gz ppe42-gcc-3b7b1092bc50d9042b9cb6e26c479cc8c0dd2150.zip |
Disable gthreads on Solaris 8/9 (PR libstdc++/52189)
PR libstdc++/52189
* acinclude.m4 (GLIBCXX_CHECK_GTHREADS): Handle
--enable-libstdcxx-threads.
Disable on Solaris 8/9 with symbol versioning.
* configure.ac (GLIBCXX_CHECK_GTHREADS): Move after
GLIBCXX_ENABLE_SYMVERS.
* configure: Regenerate.
* doc/xml/manual/configure.xml (--enable-libstdcxx-threads): Explain.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184335 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/acinclude.m4')
-rw-r--r-- | libstdc++-v3/acinclude.m4 | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 61fdb42c66d..e7ffacc19e3 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -3328,7 +3328,14 @@ dnl Check if gthread implementation defines the types and functions dnl required by the c++0x thread library. Conforming gthread dnl implementations can define __GTHREADS_CXX0X to enable use with c++0x. dnl +dnl GLIBCXX_ENABLE_SYMVERS must be done before this. +dnl AC_DEFUN([GLIBCXX_CHECK_GTHREADS], [ + GLIBCXX_ENABLE(libstdcxx-threads,auto,,[enable C++11 threads support]) + + if test x$enable_libstdcxx_threads = xauto || + test x$enable_libstdcxx_threads = xyes; then + AC_LANG_SAVE AC_LANG_CPLUSPLUS @@ -3367,7 +3374,28 @@ AC_DEFUN([GLIBCXX_CHECK_GTHREADS], [ #ifndef __GTHREADS_CXX0X #error #endif - ], [ac_has_gthreads=yes], [ac_has_gthreads=no]) + ], [case $target_os in + # gthreads support breaks symbol versioning on Solaris 8/9 (PR + # libstdc++/52189). + solaris2.[[89]]*) + if test x$enable_symvers = xno; then + ac_has_gthreads=yes + elif test x$enable_libstdcxx_threads = xyes; then + AC_MSG_WARN([You have requested C++11 threads support, but]) + AC_MSG_WARN([this breaks symbol versioning.]) + ac_has_gthreads=yes + else + ac_has_gthreads=no + fi + ;; + *) + ac_has_gthreads=yes + ;; + esac], + [ac_has_gthreads=no]) + else + ac_has_gthreads=no + fi AC_MSG_RESULT([$ac_has_gthreads]) |