public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: _GLIBCXX_ATOMIC_BUILTINS too coarse
       [not found] <CAH6eHdTcADgrrJiv2mxjNjw5_n-cQY9zeiJhVoCWkJa_hS6wYQ@mail.gmail.com>
@ 2012-04-14 13:23 ` Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2012-04-14 13:23 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: libstdc++, gcc-patches

This patch partially reverts the change made on 2012-02-10 that
partially disabled builtin atomics on powerpc, resulting in
inconsistent locking (mix of atomics and pthread mutexes) and an ABI
incompatibility with previous versions of libstdc++.  See the PR for
all the gory details.  Applying to mainline with Jonathan's approval,
and in a few days to the 4.7 branch assuming no problems appear due to
this change on mainline.

	PR libstdc++/52839
	* acinclude.m4 (_GLIBCXX_ATOMIC_BUILTINS): Do not depend on
	glibcxx_cv_atomic_long_long.
	* configure: Regenerate.

Index: libstdc++-v3/acinclude.m4
===================================================================
--- libstdc++-v3/acinclude.m4	(revision 186130)
+++ libstdc++-v3/acinclude.m4	(working copy)
@@ -2861,11 +2861,10 @@
   CXXFLAGS="$old_CXXFLAGS"
   AC_LANG_RESTORE
 
-  # Set atomicity_dir to builtins if all of above tests pass.
+  # Set atomicity_dir to builtins if all but the long long test above passes.
   if test $glibcxx_cv_atomic_bool = yes \
      && test $glibcxx_cv_atomic_short = yes \
-     && test $glibcxx_cv_atomic_int = yes \
-     && test $glibcxx_cv_atomic_long_long = yes ; then
+     && test $glibcxx_cv_atomic_int = yes; then
     AC_DEFINE(_GLIBCXX_ATOMIC_BUILTINS, 1,
     [Define if the compiler supports C++11 atomics.])
     atomicity_dir=cpu/generic/atomicity_builtins

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-04-14 13:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAH6eHdTcADgrrJiv2mxjNjw5_n-cQY9zeiJhVoCWkJa_hS6wYQ@mail.gmail.com>
2012-04-14 13:23 ` _GLIBCXX_ATOMIC_BUILTINS too coarse Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).