diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-09-12 16:34:56 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-09-12 16:35:30 +0200 |
commit | aa2fbfc4faa24cf7ee5aa9afdafddbd536ac4fec (patch) | |
tree | 5eb9d3bdc1eadc951aedcdc748aa3994c36838ab /configure.ac | |
parent | b396ae62f7e224dbc5fe71d19d987804a02f398f (diff) |
Found out that Mac OS X 10.9 has working threadsafe statics
Change-Id: Ia50181989dfacee342bfa025cbdf718edaa27832
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 84d697b422ed..45018fcbbd15 100644 --- a/configure.ac +++ b/configure.ac @@ -5880,7 +5880,20 @@ if test "$GCC" = "yes"; then dnl manual/abi.html#abi.versioning.history>; 4.3.0 is 20080306, 4.2.4 is dnl 20080519, 4.3.1 is 20080606) for Clang (for which GCC_VERSION is notoriously dnl "too old"): - if test "$_os" != Darwin -a "$_os" != Android; then + if test "$_os" = Darwin; then + dnl On Mac OS X, both /usr/lib/libstdc++.6.dylib and + dnl /usr/lib/libc++1.dylib delegate to /usr/lib/libc++abi.dylib for the + dnl __cxa_guard_* functionality; up to 10.8, libc++abi.dylib is + dnl apparently provided by a libcppabi project that has broken semantics + dnl (cf. <http://www.opensource.apple.com/source/libcppabi/libcppabi-26/ + dnl src/cxa_guard.cxx>), while in 10.9 (verified at least on 10.9.4) it + dnl is apparently provided by LLVM's libcxxabi project, which has good + dnl semantics (cf. <http://llvm.org/svn/llvm-project/libcxxabi/trunk/ + dnl src/cxa_guard.cpp>): + if test "$MAC_OS_X_VERSION_MIN_REQUIRED" -ge 1090; then + HAVE_THREADSAFE_STATICS=TRUE + fi + elif test "$_os" != Android; then if test "$COM_GCC_IS_CLANG" = TRUE; then AC_LANG_PUSH([C++]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |