[llvm-dev] using emulated-tls on Darwin 8, 9, 10
Ken Cunningham via llvm-dev
llvm-dev at lists.llvm.org
Sat Dec 8 08:06:07 PST 2018
> On 2018-12-07 22:30, Ken Cunningham via llvm-dev wrote:
>> Please excuse hobbiest-level question.
>> Darwin 11+ enables thread_local variables using system-level supports.
>> I have an interest in enabling TLS on darwin < 11 using emulated-tls.
>
> Is anyone still running macOS 10.6 or older?
>
> --
> /Jacob Carlborg
>
[off topic, apologies]
Yes, there remains a surprising amount of interest in these systems. MacPorts sees very frequent user tickets about them, many tickets lately about thread_local. All versions of clang/llvm run on 10.5+ Intel systems with minor tweaks, including the latest trunk versions, and this enables almost all current opensource software to be used on these systems. Software (like browsers) geared to these systems see downloads in the low thousands per release. I guess people either have a need for these systems for some software version or workflow, or have otherwise workable hardware that as been obsoleted by newer os requirements.
Even PowerPC systems get frequent tickets at MacPorts, and we support them as we can. Some versions of clang will run on PowerPC Macs with workable coverage (in fact the only remaining hole is a persisting issue with a bad address for c++ exceptions being supplied).
[/on topic]
Making the emutls objects in libclang_rt visible to libcxxabi.dylib at runtime has been a hiccup, tho.
It works but seems a shame to hack emutls.c into the libc++abi code when the objects are already sitting there in the executable, but (AFAICT) have the wrong visibility setting to allow use.
At present I don't seem to know enough about the underpinnings to see how to change the visibility settings on the emutls objects from libclang_rt when placed into the executable.
Appreciate any thoughts on this, thanks for your interest, and sorry for the slight divergence above.
Ken (MacPorts dev)
More information about the llvm-dev
mailing list