Opened 8 years ago

Last modified 5 years ago

#52585 closed enhancement

libcxxabi -- attempts to add thread-local-storage (TLS) to <10.9 — at Initial Version

Reported by: ken-cunningham-webuse Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc: jeremyhu (Jeremy Huddleston Sequoia)
Port: libcxxabi

Description

As per the mailing list discussion, a few ports are requesting TLS which is not available on systems prior to 10.9. 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.

Change History (3)

Changed 8 years ago by ken-cunningham-webuse

Attachment: cxa_thread_atexit.cpp added

replacement file for src/cxa_thread_atexit.cpp

Changed 8 years ago by ken-cunningham-webuse

Attachment: cxa_thread_atexit-TLS.diff added

diff from existing @3.7.0 src/cxa_thread_atexit.cpp

Changed 8 years ago by ken-cunningham-webuse

Attachment: main.log added

build log (failure) -- on 10.6 with libc++ upgrade

Note: See TracTickets for help on using tickets.