summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2016-07-17 20:13:08 +0100
committerDavid Mitchell <davem@iabyn.com>2016-07-17 20:13:08 +0100
commitab0fe36e478f78846a1944a3e22e9cd26260c042 (patch)
treeccedb0f5e4ae1e4273bd6a8b7641e2e14345b956 /perl.h
parentdf127a673e53b0cbfdfa0669f7d6276df5403c2c (diff)
downloadperl-ab0fe36e478f78846a1944a3e22e9cd26260c042.tar.gz
fix build on clang plus -DPERL_GLOBAL_STRUCT
The various PERL_TSA_* macros that utilise clang Thread Safety Analysis were failing on -DPERL_GLOBAL_STRUCT and -DPERL_GLOBAL_STRUCT_PRIVATE builds, due to lines like these: Perl_op_refcnt_lock(pTHX) PERL_TSA_ACQUIRE(PL_op_mutex) { ... } where under DPERL_GLOBAL_STRUCT globals vars aren't really global, so you can't pass PL_op_mutex as an arg to that function attribute. The simplest fix (since you can't just bung a dVAR in there) is to just disable TSA on PERL_GLOBAL_STRUCT builds.
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/perl.h b/perl.h
index dddf97d518..f110c2b606 100644
--- a/perl.h
+++ b/perl.h
@@ -3065,6 +3065,8 @@ freeing any remaining Perl interpreters.
*/
#if defined(USE_ITHREADS) && defined(I_PTHREAD) && \
defined(__clang__) && \
+ !defined(PERL_GLOBAL_STRUCT) && \
+ !defined(PERL_GLOBAL_STRUCT_PRIVATE) && \
!defined(SWIG) && \
((!defined(__apple_build_version__) && \
((__clang_major__ == 3 && __clang_minor__ >= 6) || \