id summary reporter owner description type status priority milestone component version resolution keywords cc port 52585 libcxxabi -- attempts to add thread-local-storage (TLS) to <10.7 ken-cunningham-webuse kencu "As per the mailing list discussion, a few ports are requesting TLS which is not available on systems prior to 10.7. This functionality is implemented in libcxxabi, and there are current efforts to provide a fallback mechanism for this detailed on the llvm website's libcxxxabi pages. < https://reviews.llvm.org/D21803>. This ticket hopes to follow the attempts to get this to work. First thing I notice is that the patches above appear to apply to libcxxabi @3.9.0, and we're currently running @3.7.0. I first tried to build @3.9.0 by updating the portfile, but ran into some attempts to rebuild clang-3.7 which I assume to be the dependency cycle mentioned in the libcxxabi portfile. I could drop back to clang-3.4 and try to build it, I presume -- but rather than do that, I attempted to backport the changes into libcxxabi @3.7.0 instead. Almost all the changes are in one file, src/cxa_thread_atexit.cpp, which is basically completely rewritten. I was unable to apply the patch from the website cleanly due to changes in that file from @3.7.0, so I did it manually, and hopefully without error. The changes cxa_thread_atexit.cpp file is attached. Sadly, when building the replacement libcxxabi that is supposed to provide a fallback for TLS, I now get the error saying to build the file, the system requires TLS -- which of course is sort of a catch-22. So, working on that idea further while I post progress so far." enhancement closed Normal ports 2.3.4 fixed libcxxabi