Re: thread_local storage on 10.6.8 (and earlier) with clang-7.0

2018-12-07 Thread Ken Cunningham
As per the details in the previous post below that I sent a few weeks ago, I have clang/llvm thread_local support working nicely on 10.6.8 and earlier locally. This is becoming a common issue now. On 10.6.8 and earlier thread_local is implemented using existing llvm infrastructure that is i

Re: thread_local storage on 10.6.8 (and earlier) with clang-7.0

2018-12-07 Thread Ken Cunningham
I suppose the symbols in libclang_rt.10.4.a are hidden because they are set to be hidden in the build: cmake/Modules/CompilerRTDarwinUtils.cmake 266: set(CFLAGS "-fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer") But I don't at this point understand how that is su

Re: thread_local storage on 10.6.8 (and earlier) with clang-7.0

2018-12-08 Thread Ken Cunningham
> 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. I think I'm possibly getting my head around this... ___emutls_get_address is not hidden in libclang_rt, it'

Re: thread_local storage on 10.6.8 (and earlier) with clang-7.0

2018-12-08 Thread Ken Cunningham
On 2018-12-08, at 10:24 AM, Ken Cunningham wrote: > >> 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. > So perhaps having emutls.c in libclang_rt can nev

Re: thread_local storage on 10.6.8 (and earlier) with clang-7.0

2018-12-09 Thread Jeremy Sequoia via macports-dev
Sent from my iPhone... > On Dec 7, 2018, at 11:29, Ken Cunningham > wrote: > > > > As per the details in the previous post below that I sent a few weeks ago, I > have clang/llvm thread_local support working nicely on 10.6.8 and earlier > locally. This is becoming a common issue now. >

Re: thread_local storage on 10.6.8 (and earlier) with clang-7.0

2018-12-09 Thread Ken Cunningham
On 2018-12-09, at 9:50 PM, Jeremy Sequoia wrote: > > > Yuck. Sounds like typical bootstrapping hell :/. Maybe make +emutls a > variant on libcxxabi. Thanks! - in fact I did exactly that. Also sorted out building libcxx with newer compilers. I presently have libcxx 7.0.0 with emulated-tls ru

Re: thread_local storage on 10.6.8 (and earlier) with clang-7.0

2018-12-12 Thread Ken Cunningham
Some more detailed / better answers to your raised issues: On 2018-12-09, at 9:50 PM, Jeremy Sequoia wrote: >> The issue is the "___emutls_get_address" function, which is called from >> libc++abi.dylib, and is built into clang_rt: >> >> $ nm >> /opt/local/libexec/llvm-5.0/lib/clang/5.0.1/lib

Re: thread_local storage on 10.6.8 (and earlier) with clang-7.0

2018-12-12 Thread Jeremy Sequoia via macports-dev
Sent from my iPhone... > On Dec 12, 2018, at 08:54, Ken Cunningham > wrote: > > Some more detailed / better answers to your raised issues: > > > On 2018-12-09, at 9:50 PM, Jeremy Sequoia wrote: > > >>> The issue is the "___emutls_get_address" function, which is called from >>> libc++abi