summaryrefslogtreecommitdiff
path: root/hints
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2021-06-21 02:01:29 -0600
committerTony Cook <tony@develop-help.com>2021-09-07 15:46:16 +1000
commitb1015292fcc64eae2ffdfbaffbfb27d5f4303369 (patch)
tree99e82817ea0f9d7d02e1a91cf41e1b6c2b7cc0e0 /hints
parent3683a9ee5ad61f8cb5eac30e61b4936bd0445bdb (diff)
downloadperl-b1015292fcc64eae2ffdfbaffbfb27d5f4303369.tar.gz
MACH-O can't support C11 thread local in shared objects, so disable it.
Apple's clang happily passes the probe and compiles _Thread_local no problem, but building extensions fails with ld: illegal thread local variable reference to regular symbol _PL_current_context for architecture arm64 The Internet suggests that the MACH-O format fundamentally can't support what is needed to implement C11 thread local storage in shared objects. It's frustrating that the error message is "Less Than Awesome" at explaining that this is the real problem here. Hence disable the use of C11 thread local storage in the hints file, and hence keep using pthreads.
Diffstat (limited to 'hints')
-rw-r--r--hints/darwin.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/hints/darwin.sh b/hints/darwin.sh
index fdfbdd4a3b..ea521003c3 100644
--- a/hints/darwin.sh
+++ b/hints/darwin.sh
@@ -535,3 +535,7 @@ esac
# mkostemp() was autodetected as present but found to not be linkable
# on 15.6.0. Unknown what other OS versions are affected.
d_mkostemp=undef
+
+# Apparently the MACH-O format can't support _Thread_local in shared objects,
+# but clang isn't wise to this, so our probe works but the build fails...
+d_thread_local=undef