This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Bump the TSA clang minimum to 3.6 (in Applese 6.1)
authorJarkko Hietaniemi <jhi@iki.fi>
Wed, 2 Dec 2015 17:23:01 +0000 (12:23 -0500)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 2 Dec 2015 17:30:33 +0000 (12:30 -0500)
Since it looks like the 3.5 (6.0) in OS X 9 didn't recognize the annotations.

perl.h

diff --git a/perl.h b/perl.h
index 1e7afa0..727e6be 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -3065,18 +3065,20 @@ freeing any remaining Perl interpreters.
 /* clang Thread Safety Analysis/Annotations/Attributes
  * http://clang.llvm.org/docs/ThreadSafetyAnalysis.html
  *
- * Available since clang 3.5-ish (appeared in 3.4, but shaky).
+ * Available since clang 3.6-ish (appeared in 3.4, but shaky still in 3.5).
  * Apple XCode hijacks __clang_major__ and __clang_minor__
- * (6.0 means really clang 3.5), so needs extra hijinks.
+ * (6.1 means really clang 3.6), so needs extra hijinks
+ * (could probably also test the contents of __apple_build_version__).
  */
 #if defined(USE_ITHREADS) && defined(I_PTHREAD) && \
     defined(__clang__) && \
     !defined(SWIG) && \
   ((!defined(__apple_build_version__) &&               \
-    ((__clang_major__ == 3 && __clang_minor__ >= 5) || \
+    ((__clang_major__ == 3 && __clang_minor__ >= 6) || \
      (__clang_major__ >= 4))) || \
    (defined(__apple_build_version__) &&                \
-    ((__clang_major__ >= 6))))
+    ((__clang_major__ == 6 && __clang_minor__ >= 1) || \
+     (__clang_major__ >= 7))))
 #  define PERL_TSA__(x)   __attribute__((x))
 #  define PERL_TSA_ACTIVE
 #else