re PR libstdc++/51181 (libstdc++.so __sync_sub_and_fetch_4 linkage error causing...
authorRichard Henderson <rth@redhat.com>
Fri, 18 Nov 2011 01:38:48 +0000 (17:38 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Fri, 18 Nov 2011 01:38:48 +0000 (17:38 -0800)
PR libstdc++/51181
        * libsupc++/eh_tm.cc (free_any_cxa_exception): Protect the use
        of __sync_sub_and_fetch with _GLIBCXX_ATOMIC_BUILTINS_4.

From-SVN: r181465

libstdc++-v3/ChangeLog
libstdc++-v3/libsupc++/eh_tm.cc

index a2b4ceb26eeb81c456f3839bd0aef35e79e1bbdc..c52db38958374232c74cff05cc53ae4a5edc2d55 100644 (file)
@@ -1,3 +1,9 @@
+2011-11-17  Richard Henderson  <rth@redhat.com>
+
+       PR libstdc++/51181
+       * libsupc++/eh_tm.cc (free_any_cxa_exception): Protect the use
+       of __sync_sub_and_fetch with _GLIBCXX_ATOMIC_BUILTINS_4.
+
 2011-11-18  Jonathan Wakely  <jwakely.gcc@gmail.com>
 
        * testsuite/30_threads/thread/native_handle/typesizes.cc: Do not run
index f5815a180df90efa5bbed751d1f92a65bbe51aa2..a64610283ff7c87ca6a8369890a09c172c10dd99 100644 (file)
@@ -45,7 +45,9 @@ free_any_cxa_exception (_Unwind_Exception *eo)
       __cxa_free_dependent_exception (dep);
     }
 
+#ifdef _GLIBCXX_ATOMIC_BUILTINS_4
   if (__sync_sub_and_fetch (&h->referenceCount, 1) == 0)
+#endif
     __cxa_free_exception (h + 1);
 }