Page MenuHomeFreeBSD

mips: Don't set __NO_TLS to disable some uses of TLS.
ClosedPublic

Authored by jhb on Feb 16 2021, 6:53 PM.

Details

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jhb requested review of this revision.Feb 16 2021, 6:53 PM

why is this no longer needed? why was it done in the first place?

The change itself looks good, but a few words towards answering either of these questions would help our future selves sort this out.

This revision is now accepted and ready to land.Feb 17 2021, 10:20 PM

Hmmm, so __NO_TLS was first added in 82dd5016bd749d1d9e1531bd1703aebeecceab34 to support locale extensions in libc. I think it means that the compiler doesn't support TLS in the form of the _Thread keyword. Maybe this was due to GCC 4.2? The log message isn't super clear. It doesn't guard other TLS usage such as in jemalloc which was compiled with GCC 4.2. so it's hard to understand how long this has been rotted.

In D28713#643917, @jhb wrote:

Hmmm, so __NO_TLS was first added in 82dd5016bd749d1d9e1531bd1703aebeecceab34 to support locale extensions in libc. I think it means that the compiler doesn't support TLS in the form of the _Thread keyword. Maybe this was due to GCC 4.2? The log message isn't super clear. It doesn't guard other TLS usage such as in jemalloc which was compiled with GCC 4.2. so it's hard to understand how long this has been rotted.

This is good information to include in the commit, since it gives the context for why it was there originally, and why it's no longer needed. 8 years ago is getting into the range of 'overcome by other events and not cleaned up'