In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/67083b7b2d5c1863032b4a0ebb7156a4249c645a?hp=dfe3adb55fc27cfdbdea35190eb5023e786b1466>
- Log ----------------------------------------------------------------- commit 67083b7b2d5c1863032b4a0ebb7156a4249c645a Author: Tony Cook <[email protected]> Date: Mon Apr 4 12:03:58 2016 +1000 avoid mis-mangled name references on threaded C++ builds g++ on recent darwin appears to be clang++ in disguise, and so supports the TSA decorations, but the wrappers we define don't have explicit extern "C" linkage (which perlapi.h does have). Under C++ Time::HiRes wraps its includes in extern "C" { }, and so references unmangled names for the perl_tsa_mutex_*() wrappers, but since util.c never sees an extern "C" for those functions it produces mangled names, causing undefined references in Time::HiRes. Detected by a smoke run againt a smoke-me branch: http://www.nntp.perl.org/group/perl.daily-build.reports/2016/03/msg190183.html Longer term the TSA decorations should probably be probed for in Configure and the wrapper declarations moved to embed.fnc ----------------------------------------------------------------------- Summary of changes: perl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perl.h b/perl.h index 0468a1c..fd716c3 100644 --- a/perl.h +++ b/perl.h @@ -3192,10 +3192,10 @@ typedef pthread_key_t perl_key; * TODO: however, some platforms are starting to get these clang * thread safety annotations for pthreads, for example FreeBSD. * Do we need a way to a bypass these wrappers? */ -int perl_tsa_mutex_lock(perl_mutex* mutex) +EXTERN_C int perl_tsa_mutex_lock(perl_mutex* mutex) PERL_TSA_ACQUIRE(*mutex) PERL_TSA_NO_TSA; -int perl_tsa_mutex_unlock(perl_mutex* mutex) +EXTERN_C int perl_tsa_mutex_unlock(perl_mutex* mutex) PERL_TSA_RELEASE(*mutex) PERL_TSA_NO_TSA; #endif -- Perl5 Master Repository
