This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
avoid mis-mangled name references on threaded C++ builds
authorTony Cook <tony@develop-help.com>
Mon, 4 Apr 2016 02:03:58 +0000 (12:03 +1000)
committerTony Cook <tony@develop-help.com>
Mon, 4 Apr 2016 02:03:58 +0000 (12:03 +1000)
commit67083b7b2d5c1863032b4a0ebb7156a4249c645a
treea3984b6864060348b69ccf14fe2e0d164d7c1e74
parentdfe3adb55fc27cfdbdea35190eb5023e786b1466
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
perl.h